Created
January 10, 2014 03:36
-
-
Save Sunnyztj/8346610 to your computer and use it in GitHub Desktop.
rails s api
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
1. update: | |
api: | |
put :update do | |
authenticate! | |
if current_user.update_attributes params[:user] | |
current_user | |
else | |
error!({ error: current_user.errors.full_messages }, 422) | |
end | |
end | |
postman: | |
X-USER-ACCESS-TOKEN FMsqf6AG5ZnxqBbuqnqT | |
user[first_name] ben | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment