Class: Alephbet::ManagementController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Alephbet::ManagementController
- Defined in:
- app/controllers/alephbet/management_controller.rb
Constant Summary collapse
- PARAMS =
%i[experiment variant event namespace].freeze
Instance Method Summary collapse
Instance Method Details
#cors_preflight_check ⇒ Object
21 22 23 |
# File 'app/controllers/alephbet/management_controller.rb', line 21 def cors_preflight_check head :ok end |
#experiments ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/alephbet/management_controller.rb', line 9 def experiments namespace = permitted_params[:namespace] || "alephbet" @scope = Alephbet::Experiment.where(:namespace => namespace) refine_scope if permitted_params[:scope].present? respond_to do |format| format.json { render :json => results, :status => :ok } end end |