Class: Toker::UsersController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- Toker::UsersController
- Defined in:
- app/controllers/toker/users_controller.rb
Instance Method Summary collapse
Methods included from TokenAuthentication
Instance Method Details
#create ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'app/controllers/toker/users_controller.rb', line 7 def create user = User.new(person_params) if user.save render json: user, status: 201 else head 500 end end |
#index ⇒ Object
16 17 18 |
# File 'app/controllers/toker/users_controller.rb', line 16 def index render json: User.all end |
#show ⇒ Object
20 21 22 23 |
# File 'app/controllers/toker/users_controller.rb', line 20 def show user = User.find(params[:id]) render json: user end |