Class: Recruiter::Users::ArticlesController
Instance Method Summary
collapse
#page, #per_page
#crud_flash, #set_crud_error_flash, #set_crud_success_flash
Instance Method Details
#create ⇒ Object
20
21
22
23
24
|
# File 'app/controllers/recruiter/users/articles_controller.rb', line 20
def create
@article = scope.build(article_params)
crud_flash @article.save
respond_with(@article)
end
|
#destroy ⇒ Object
35
36
37
38
|
# File 'app/controllers/recruiter/users/articles_controller.rb', line 35
def destroy
crud_flash @article.destroy
respond_with(@article)
end
|
#edit ⇒ Object
26
27
28
|
# File 'app/controllers/recruiter/users/articles_controller.rb', line 26
def edit
respond_with(@article)
end
|
#index ⇒ Object
6
7
8
9
|
# File 'app/controllers/recruiter/users/articles_controller.rb', line 6
def index
@articles = scope.page(page).per(per_page)
respond_with(@articles)
end
|
#new ⇒ Object
15
16
17
18
|
# File 'app/controllers/recruiter/users/articles_controller.rb', line 15
def new
@article = scope.build
respond_with(@article)
end
|
#show ⇒ Object
11
12
13
|
# File 'app/controllers/recruiter/users/articles_controller.rb', line 11
def show
respond_with(@article)
end
|
#update ⇒ Object
30
31
32
33
|
# File 'app/controllers/recruiter/users/articles_controller.rb', line 30
def update
crud_flash @article.update(article_params)
respond_with(@article)
end
|