Class: Tenon::Comment
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Tenon::Comment
- Includes:
- Humanizer
- Defined in:
- app/models/tenon/comment.rb
Instance Attribute Summary collapse
-
#bypass_humanizer ⇒ Object
Returns the value of attribute bypass_humanizer.
-
#controller ⇒ Object
Returns the value of attribute controller.
-
#subscribe ⇒ Object
Returns the value of attribute subscribe.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#bypass_humanizer ⇒ Object
Returns the value of attribute bypass_humanizer.
11 12 13 |
# File 'app/models/tenon/comment.rb', line 11 def bypass_humanizer @bypass_humanizer end |
#controller ⇒ Object
Returns the value of attribute controller.
11 12 13 |
# File 'app/models/tenon/comment.rb', line 11 def controller @controller end |
#subscribe ⇒ Object
Returns the value of attribute subscribe.
11 12 13 |
# File 'app/models/tenon/comment.rb', line 11 def subscribe @subscribe end |
Class Method Details
Instance Method Details
#approve ⇒ Object
31 32 33 |
# File 'app/models/tenon/comment.rb', line 31 def approve self.approved = true end |
#toggle_approved! ⇒ Object
26 27 28 29 |
# File 'app/models/tenon/comment.rb', line 26 def toggle_approved! self.approved = self.approved? ? false : true save end |