Module: Trailblazer::V1_1::Operation::Resolver::BuildOperation

Defined in:
lib/trailblazer/1.1/operation/resolver.rb

Instance Method Summary collapse

Instance Method Details

#build_operation(params, options = {}) ⇒ Object



17
18
19
20
21
22
# File 'lib/trailblazer/1.1/operation/resolver.rb', line 17

def build_operation(params, options={})
  model  = model!(params)
  policy = policy_config.call(params[:current_user], model)
  build_operation_class(model, policy, params).
    new(params, options.merge(model: model, policy: policy))
end