Skip to content

Instantly share code, notes, and snippets.

@hchood
Created March 15, 2016 12:19
Show Gist options
  • Save hchood/6d7f7deae716eac64a42 to your computer and use it in GitHub Desktop.
Save hchood/6d7f7deae716eac64a42 to your computer and use it in GitHub Desktop.
# app/controllers/v1/users_controller.rb
class V1::UsersController < V1::ApplicationController
def create
user = SignUpUser.perform(user_params)
render json: user, serializer: AuthenticationSerializer, root: :user
end
private
def user_params
params.require(:user).permit(:email, :password)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment