Class: Backend::ImageCollectionsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- Backend::ImageCollectionsController
show all
- Defined in:
- app/controllers/backend/image_collections_controller.rb
Instance Method Summary
collapse
#breadcrumb, #current_admin, #default_app_locale, #translate_notice
#crypt
Instance Method Details
#create ⇒ Object
17
18
19
20
21
22
23
24
25
26
|
# File 'app/controllers/backend/image_collections_controller.rb', line 17
def create
@model = ImageCollection.new(allowed_params)
if @model.save
redirect_to edit_backend_image_collection_path(@model),
notice: translate_notice(:added, :image_collection)
else
render :new
end
end
|
#destroy ⇒ Object
36
37
38
39
|
# File 'app/controllers/backend/image_collections_controller.rb', line 36
def destroy
@model.destroy
redirect_to backend_image_collections_path, notice: translate_notice(:deleted, :image_collection)
end
|
#index ⇒ Object
5
6
7
|
# File 'app/controllers/backend/image_collections_controller.rb', line 5
def index
@image_collections = ImageCollection.order(:description)
end
|
#new ⇒ Object
13
14
15
|
# File 'app/controllers/backend/image_collections_controller.rb', line 13
def new
@model = ImageCollection.new
end
|
#show ⇒ Object
9
10
11
|
# File 'app/controllers/backend/image_collections_controller.rb', line 9
def show
redirect_to edit_backend_image_collection_path(@model)
end
|
#update ⇒ Object
28
29
30
31
32
33
34
|
# File 'app/controllers/backend/image_collections_controller.rb', line 28
def update
if @model.update_attributes allowed_params
redirect_to backend_image_collections_path, notice: translate_notice(:edited, :image_collection)
else
render :edit
end
end
|