Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create the controller users_controller.rb
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