Module: Frigate::Operation::Controller::Helpers
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/frigate/operation/controller.rb
Overview
Helpers for rails controllers
Instance Method Summary collapse
-
#render_operation(*args) ⇒ Object
render-operation helps to render operation data.
-
#run_operation(klass, params) ⇒ Object
run-operation helps to run operation elegantly.
Instance Method Details
#render_operation(*args) ⇒ Object
render-operation helps to render operation data
35 36 37 38 |
# File 'lib/frigate/operation/controller.rb', line 35 def render_operation(*args) run_operation(*args).render(self) # raise run_operation(*args).errors.messages.inspect end |
#run_operation(klass, params) ⇒ Object
run-operation helps to run operation elegantly
28 29 30 |
# File 'lib/frigate/operation/controller.rb', line 28 def run_operation(klass, params) klass.run(params) end |