Class: Tenon::Contact

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Humanizer
Defined in:
app/models/tenon/contact.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addressObject

Returns the value of attribute address.



6
7
8
# File 'app/models/tenon/contact.rb', line 6

def address
  @address
end

#bypass_humanizerObject

Returns the value of attribute bypass_humanizer.



6
7
8
# File 'app/models/tenon/contact.rb', line 6

def bypass_humanizer
  @bypass_humanizer
end

#controllerObject

Returns the value of attribute controller.



6
7
8
# File 'app/models/tenon/contact.rb', line 6

def controller
  @controller
end

#page_idObject

Returns the value of attribute page_id.



6
7
8
# File 'app/models/tenon/contact.rb', line 6

def page_id
  @page_id
end

#subscribeObject

Returns the value of attribute subscribe.



6
7
8
# File 'app/models/tenon/contact.rb', line 6

def subscribe
  @subscribe
end

Instance Method Details

#pooh_in_the_honey?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'app/models/tenon/contact.rb', line 30

def pooh_in_the_honey?
  address.present?
end

#toggle_read!Object



25
26
27
28
# File 'app/models/tenon/contact.rb', line 25

def toggle_read!
  self.read = self.read? ? false : true
  save
end

#toggle_replied!Object



20
21
22
23
# File 'app/models/tenon/contact.rb', line 20

def toggle_replied!
  self.replied = self.replied? ? false : true
  save
end