Class: Pageflow::Editor::FileFoldersController Private
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Pageflow::Editor::FileFoldersController
- Defined in:
- app/controllers/pageflow/editor/file_folders_controller.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #create ⇒ Object private
- #destroy ⇒ Object private
- #index ⇒ Object private
- #update ⇒ Object private
Instance Method Details
#create ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/controllers/pageflow/editor/file_folders_controller.rb', line 18 def create entry = DraftEntry.find(params[:entry_id]) (:edit, entry.to_model) verify_edit_lock!(entry) @file_folder = entry.create_folder!(create_params) respond_with(:editor, @file_folder) rescue ActiveRecord::RecordInvalid => e debug_log_with_backtrace(e) head :unprocessable_entity end |
#destroy ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'app/controllers/pageflow/editor/file_folders_controller.rb', line 44 def destroy entry = DraftEntry.find(params[:entry_id]) (:edit, entry.to_model) verify_edit_lock!(entry) folder = folder(entry) return head(:unprocessable_entity) unless folder.empty? folder.destroy head(:no_content) end |
#index ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 12 13 14 15 16 |
# File 'app/controllers/pageflow/editor/file_folders_controller.rb', line 9 def index entry = DraftEntry.find(params[:entry_id]) (:use_files, entry.to_model) @file_folders = folders(entry) respond_with(:editor, @file_folders) end |
#update ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'app/controllers/pageflow/editor/file_folders_controller.rb', line 31 def update entry = DraftEntry.find(params[:entry_id]) (:edit, entry.to_model) verify_edit_lock!(entry) folder(entry).update!(update_params) head(:no_content) rescue ActiveRecord::RecordInvalid => e debug_log_with_backtrace(e) head :unprocessable_entity end |