Skip to content

Instantly share code, notes, and snippets.

@angerman
Created June 30, 2011 12:46
Show Gist options
  • Save angerman/1056156 to your computer and use it in GitHub Desktop.
Save angerman/1056156 to your computer and use it in GitHub Desktop.
def create
@name = params[:name]
@password = params[:password]
@email = params[:email]
if not @email
respond_with({})
else
@user = User.create({:name => params[:name]})
respond_with(@user, :location => users_url, :status => :created)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment