Class: NewsItem

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.per_pageObject



18
19
20
# File 'vendor/plugins/news/app/models/news_item.rb', line 18

def self.per_page
  20
end

Instance Method Details

#not_published?Boolean

has the published date not yet arrived?

Returns:

  • (Boolean)


14
15
16
# File 'vendor/plugins/news/app/models/news_item.rb', line 14

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