Class: Spina::Admin::MediaFoldersController
- Inherits:
-
AdminController
- Object
- ActionController::Base
- Spina::ApplicationController
- AdminController
- Spina::Admin::MediaFoldersController
- Defined in:
- app/controllers/spina/admin/media_folders_controller.rb
Instance Method Summary collapse
Methods inherited from AdminController
Instance Method Details
#create ⇒ Object
18 19 20 21 22 |
# File 'app/controllers/spina/admin/media_folders_controller.rb', line 18 def create @media_folder = MediaFolder.new(media_folder_params) @media_folder.save redirect_to spina.admin_images_path end |
#destroy ⇒ Object
24 25 26 27 28 |
# File 'app/controllers/spina/admin/media_folders_controller.rb', line 24 def destroy @media_folder = MediaFolder.find(params[:id]) @media_folder.destroy redirect_to spina.admin_images_path end |
#new ⇒ Object
6 7 8 |
# File 'app/controllers/spina/admin/media_folders_controller.rb', line 6 def new @media_folder = MediaFolder.new end |
#show ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/controllers/spina/admin/media_folders_controller.rb', line 10 def show I18n.t('spina.website.media_library'), admin_media_library_path I18n.t('spina.website.images'), spina.admin_images_path @media_folder = MediaFolder.find(params[:id]) @media_folder.name @images = @media_folder.images.sorted.page(params[:page]) end |