Class: PagesCms::ArticlesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/pages_cms/articles_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#current_account, #selected_account

Instance Method Details

#indexObject



6
7
8
9
10
11
# File 'app/controllers/pages_cms/articles_controller.rb', line 6

def index
  @articles = Article.published
  filter_params(params).each do |search, result|
    @articles = @articles.public_send(search, result) if result.present?
  end
end

#showObject



13
14
15
# File 'app/controllers/pages_cms/articles_controller.rb', line 13

def show
  @article = Article.find(params[:id])
end