Created
March 28, 2019 11:37
-
-
Save MaryKuz/3592909c9bde4e2cec56af5ee71b4725 to your computer and use it in GitHub Desktop.
Create the controller users_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Api::UsersController < ApplicationController | |
private | |
def build_resource | |
@user = User.new resource_params | |
end | |
def resource | |
@user | |
end | |
def resource_params | |
params.require(:user).permit(:name, :email, :password, :password_confirmation) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment