Class: Audiences::ContextsController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- Audiences::ContextsController
- Defined in:
- app/controllers/audiences/contexts_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
5 6 7 |
# File 'app/controllers/audiences/contexts_controller.rb', line 5 def show render json: Audiences::Context.load(params.require(:key)) end |
#update ⇒ Object
9 10 11 |
# File 'app/controllers/audiences/contexts_controller.rb', line 9 def update render json: Audiences.update(params.require(:key), **context_params) end |
#users ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/audiences/contexts_controller.rb', line 13 def users users = (current_criterion || current_context).users search = UsersSearch.new(scope: users, query: params[:search], limit: params[:limit], offset: params[:offset]) render json: search end |