Class: NewsItem

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/news_item.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.per_pageObject



20
21
22
# File 'app/models/news_item.rb', line 20

def self.per_page
  20
end

Instance Method Details

#not_published?Boolean

has the published date not yet arrived?

Returns:

  • (Boolean)


16
17
18
# File 'app/models/news_item.rb', line 16

def not_published? # has the published date not yet arrived?
  publish_date > Time.now
end