Class: Blogg::Post
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Blogg::Post
- Extended by:
- FriendlyId
- Defined in:
- app/models/blogg/post.rb
Instance Method Summary collapse
Instance Method Details
#article? ⇒ Boolean
21 22 23 |
# File 'app/models/blogg/post.rb', line 21 def article? !static end |
#next ⇒ Object
25 26 27 |
# File 'app/models/blogg/post.rb', line 25 def next self.class.articles.where('id > ?', id).first end |
#prev ⇒ Object
29 30 31 |
# File 'app/models/blogg/post.rb', line 29 def prev self.class.articles.where('id < ?', id).last end |
#static? ⇒ Boolean
17 18 19 |
# File 'app/models/blogg/post.rb', line 17 def static? static end |