Skip to content

Instantly share code, notes, and snippets.

@gbelote
Created February 9, 2013 01:17
Show Gist options
  • Save gbelote/4743347 to your computer and use it in GitHub Desktop.
Save gbelote/4743347 to your computer and use it in GitHub Desktop.
class SomeController < ApplicationController
# params either looks like...
# params = { login: { email: "foo@example.com", password: "bar" } }
# params = { new_user: { email: "foo@example.com", full_name: "Soo Moo", password: "bar" } }
def some_endpoint
@user = User::SignupOrLoginService.new(params, request.remote_ip).auth
render json: @user
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment