Class: RiddlerAdmin::SlugsController
Instance Method Summary
collapse
#riddler_current_user, #riddler_user_can_approve?, #riddler_user_can_deploy?
Instance Method Details
#create ⇒ Object
19
20
21
22
23
24
25
26
27
|
# File 'app/controllers/riddler_admin/slugs_controller.rb', line 19
def create
@slug = Slug.new slug_params
if @slug.save
redirect_to slugs_url, notice: "Slug was successfully created."
else
render :new
end
end
|
#destroy ⇒ Object
40
41
42
43
44
|
# File 'app/controllers/riddler_admin/slugs_controller.rb', line 40
def destroy
raise "Destroying slugs is not currently supported"
@slug.destroy
redirect_to slugs_url, notice: "Slug was successfully destroyed."
end
|
#edit ⇒ Object
29
30
|
# File 'app/controllers/riddler_admin/slugs_controller.rb', line 29
def edit
end
|
#index ⇒ Object
8
9
10
|
# File 'app/controllers/riddler_admin/slugs_controller.rb', line 8
def index
@slugs = Slug.all
end
|
#new ⇒ Object
15
16
17
|
# File 'app/controllers/riddler_admin/slugs_controller.rb', line 15
def new
@slug = Slug.new
end
|
#show ⇒ Object
12
13
|
# File 'app/controllers/riddler_admin/slugs_controller.rb', line 12
def show
end
|
#update ⇒ Object
32
33
34
35
36
37
38
|
# File 'app/controllers/riddler_admin/slugs_controller.rb', line 32
def update
if @slug.update slug_params
redirect_to slugs_url, notice: "Slug was successfully updated."
else
render :edit
end
end
|