Class: Archipelago::IslandsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Archipelago::IslandsController
- Defined in:
- app/controllers/archipelago/islands_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/archipelago/islands_controller.rb', line 11 def create validate_origin! action_class = resolver.resolve(component: params[:component], operation: params[:operation]) action = action_class.new(ctx: request_context, raw_params: island_params) payload = action.call render json: payload, status: rack_status_for(payload) end |
#debug ⇒ Object
21 22 23 24 25 |
# File 'app/controllers/archipelago/islands_controller.rb', line 21 def debug return head :not_found unless Rails.env.development? || Rails.env.test? render json: debug_payload end |