Class: Api::UsersController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- Api::UsersController
- Includes:
- UsersControllerTemplate
- Defined in:
- app/controllers/api/users_controller.rb
Instance Method Summary collapse
Methods included from OnBaseOrganizationOnly
Methods included from Mumuki::Laboratory::Controllers::CurrentOrganization
#organization_name, #set_current_organization!, #visit_organization!
Methods included from WithAuthorization
#authorization_slug, #authorize_janitor!, #authorize_owner!, #protection_slug
Methods included from Mumuki::Laboratory::Controllers::DynamicErrors
#bad_record, #blocked_forum, #forbidden, #gone, #internal_server_error, #not_found, #render_error, #unauthorized
Instance Method Details
#create ⇒ Object
6 7 8 9 10 |
# File 'app/controllers/api/users_controller.rb', line 6 def create @user.save! @user.notify! render json: @user.to_resource_h end |
#update ⇒ Object
12 13 14 15 16 |
# File 'app/controllers/api/users_controller.rb', line 12 def update @user.update! user_params.except([:email, :permissions, :uid]) @user.notify! render json: @user.to_resource_h end |