Class: Comment
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Comment
- Defined in:
- app/models/polymorphic/comment.rb
Overview
Copyright (c) 2008-2013 Michael Dvorkin and contributors.
Fat Free CRM is freely distributable under the terms of MIT license. See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
Schema Information
Table name: comments
id :integer not null, primary key user_id :integer commentable_id :integer commentable_type :string(255) private :boolean title :string(255) default("") comment :text created_at :datetime updated_at :datetime state :string(16) default("Expanded"), not null
Instance Method Summary collapse
Instance Method Details
#collapsed? ⇒ Boolean
41 42 43 |
# File 'app/models/polymorphic/comment.rb', line 41 def collapsed? state == "Collapsed" end |
#expanded? ⇒ Boolean
37 38 39 |
# File 'app/models/polymorphic/comment.rb', line 37 def state == "Expanded" end |