Class: HaveAPI::Resources::ActionState::Show
- Inherits:
-
Actions::Default::Show
- Object
- Common
- Action
- Actions::Default::Show
- HaveAPI::Resources::ActionState::Show
- Includes:
- Mixin
- Defined in:
- lib/haveapi/resources/action_state.rb
Instance Attribute Summary
Attributes inherited from Action
#current_user, #errors, #flags, #message, #request, #version
Instance Method Summary collapse
Methods included from Mixin
Methods inherited from Action
add_pre_authorize_blocks, authorize, #authorized?, build_route, delayed_inherited, describe, example, from_context, inherit_attrs_from_resource, inherited, #initialize, initialize, #input, input, meta, #meta, model_adapter, output, #params, #pre_exec, #prepare, resolve_path_params, #safe_exec, #safe_output, #set_meta, #v?, #validate!, validate_build
Methods included from Hookable
Methods inherited from Common
check_build, has_attr, inherit_attrs
Constructor Details
This class inherits a constructor from HaveAPI::Action
Instance Method Details
#exec ⇒ Object
140 141 142 143 144 145 146 147 148 149 |
# File 'lib/haveapi/resources/action_state.rb', line 140 def exec state = @context.server.action_state.new( current_user, id: params[:action_state_id] ) return state_to_hash(state) if state.valid? error!('action state not found') end |