Module: MimeActor::Action
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/mime_actor/action.rb
Overview
# MimeActor Action
‘Action` is the recommended `Module` to be included in the `ActionController`.
Provides intuitive way of ‘action` processing for a specific MIME type with callback + rescue handlers.
Constant Summary
Constants included from Callbacks
Instance Method Summary collapse
-
#start_scene(&block) ⇒ Object
The core logic where rendering logics are collected as ‘Proc` and passed over to `ActionController::MimeResponds`.
Methods included from Stage
Methods included from Rescue
Methods included from Callbacks
Instance Method Details
#start_scene(&block) ⇒ Object
The core logic where rendering logics are collected as ‘Proc` and passed over to `ActionController::MimeResponds`
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/mime_actor/action.rb', line 47 def start_scene(&block) action = action_name.to_sym formats = acting_scenes.fetch(action, {}) if formats.empty? logger.warn { "no format found for action: #{action_name.inspect}" } yield if block_given? else respond_to_scene(action, formats, block) end end |