Class: PagesCms::ArticlesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- PagesCms::ArticlesController
- Defined in:
- app/controllers/pages_cms/articles_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
6 7 8 9 10 11 |
# File 'app/controllers/pages_cms/articles_controller.rb', line 6 def index @articles = Article.all filter_params(params).each do |search, result| @articles = @articles.public_send(search, result) if result.present? end end |
#show ⇒ Object
13 14 15 |
# File 'app/controllers/pages_cms/articles_controller.rb', line 13 def show @article = Article.find(params[:id]) end |