Module: RocketCMS::Controllers::News
- Extended by:
- ActiveSupport::Concern
- Included in:
- NewsController
- Defined in:
- lib/rocket_cms/controllers/news.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/rocket_cms/controllers/news.rb', line 6 def index @news = model.enabled.after_now.by_date unless RocketCMS.config.news_per_page.nil? @news = @news.page(params[:page]) end end |
#show ⇒ Object
14 15 16 |
# File 'lib/rocket_cms/controllers/news.rb', line 14 def show @news = model.after_now.find(params[:id]) end |