Class Phone
In: lib/phone.rb
Parent: ActiveRecord::Base

Methods

is_primary?   new   number   number=  

Public Class methods

[Source]

    # File lib/phone.rb, line 11
11:   def initialize(params)
12:     super(params)
13: 
14:     self.createdate   ||= Time.now
15:     self.modifieddate = Time.now
16:     self.companyid    = self.user.companyid
17:     self.username     ||= self.user.fullname
18:     self.classnameid  = Classname.find_by_value('com.liferay.portal.model.Contact').id
19:     self.classpk      = self.user.contact.id
20:     self.typeid       ||= ListType.find_by_name('Mobile').id
21:     self.primary_=true if self.primary_.nil?
22: 
23:     self.save
24:   end

Public Instance methods

[Source]

    # File lib/phone.rb, line 34
34:   def is_primary?
35:     self.primary_
36:   end

[Source]

    # File lib/phone.rb, line 26
26:   def number
27:     self.number_
28:   end

[Source]

    # File lib/phone.rb, line 30
30:   def number=(val)
31:     self.number_ = val
32:   end

[Validate]