Class: Kms::UsersController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Kms::UsersController
- Defined in:
- app/controllers/kms/users_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'app/controllers/kms/users_controller.rb', line 12 def create @user = User.new(user_params) if @user.save head :no_content else render json: {errors: @user.errors}.to_json, status: :unprocessable_entity end end |
#destroy ⇒ Object
21 22 23 24 25 |
# File 'app/controllers/kms/users_controller.rb', line 21 def destroy @user = User.find(params[:id]) @user.destroy head :no_content end |
#index ⇒ Object
8 9 10 |
# File 'app/controllers/kms/users_controller.rb', line 8 def index render json: User.all end |
#kms_user ⇒ Object
27 28 29 |
# File 'app/controllers/kms/users_controller.rb', line 27 def kms_user render json: current_kms_user end |