Module: ServiceController::RestActions
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/concerns/service_controller/rest_actions.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'app/concerns/service_controller/rest_actions.rb', line 24 def call @result = execute_service if @result.success? if respond_to?(:after_success_location) redirect_to(after_success_location, notice: ) else flash.now[:success] = render :success end else render :invoke end end |
#index ⇒ Object
17 18 |
# File 'app/concerns/service_controller/rest_actions.rb', line 17 def index end |
#invoke ⇒ Object
20 21 22 |
# File 'app/concerns/service_controller/rest_actions.rb', line 20 def invoke respond_with @service end |