Class: Pageflow::Editor::EncodingConfirmationsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Pageflow::Editor::EncodingConfirmationsController
- Defined in:
- app/controllers/pageflow/editor/encoding_confirmations_controller.rb
Instance Method Summary collapse
Instance Method Details
#check ⇒ Object
20 21 22 23 24 25 |
# File 'app/controllers/pageflow/editor/encoding_confirmations_controller.rb', line 20 def check entry = DraftEntry.find(params[:entry_id]) (:confirm_encoding, entry.to_model) @encoding_confirmation = build_encoding_confirmation(entry) end |
#create ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/pageflow/editor/encoding_confirmations_controller.rb', line 8 def create entry = DraftEntry.find(params[:entry_id]) (:confirm_encoding, entry.to_model) @encoding_confirmation = build_encoding_confirmation(entry) @encoding_confirmation.save! render(json: {}) rescue EncodingConfirmation::QuotaExceededError render(action: :check, status: :forbidden) end |