Class: Auth::Api::MesController
- Inherits:
-
BaseController
- Object
- BaseController
- Auth::Api::MesController
- Defined in:
- app/controllers/auth/api/mes_controller.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
17 18 19 20 |
# File 'app/controllers/auth/api/mes_controller.rb', line 17 def destroy @user.destroy redirect_to api_me_url, notice: 'Me was successfully destroyed.' end |
#show ⇒ Object
5 6 7 |
# File 'app/controllers/auth/api/mes_controller.rb', line 5 def show render json: @user.as_json(root: true, include: [:oauth_users], methods: [:avatar_url]) end |
#update ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/controllers/auth/api/mes_controller.rb', line 9 def update if @user.update(user_params) render json: @user.as_json(root: true, methods: [:avatar_url]), status: :created else process_errors(@user) end end |