Class: NewsController
- Inherits:
-
PostsController
- Object
- ApplicationController
- PostsController
- NewsController
- Defined in:
- app/controllers/news_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
4 5 6 |
# File 'app/controllers/news_controller.rb', line 4 def index @news = News.published.order('date DESC').paginate(page: params[:page],per_page: 10) end |