Class: Post
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Post
- Defined in:
- app/models/post.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.per_page ⇒ Object
2 3 4 |
# File 'app/models/post.rb', line 2 def self.per_page 25 end |
Instance Method Details
#editable_by?(user) ⇒ Boolean
18 19 20 |
# File 'app/models/post.rb', line 18 def editable_by?(user) user && (user.id == user_id) end |