Last active
April 5, 2016 19:45
-
-
Save hosamshahin/fbf9c589494d73bdae7f08267562cb3a to your computer and use it in GitHub Desktop.
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
- How To Set Up Devise AJAX Authentication With Rails 4.0 | |
- review the blog post here: http://blog.andrewray.me/how-to-set-up-devise-ajax-authentication-with-rails-4-0/ | |
- Then: | |
// sidn_up | |
$.post( | |
"https://192.168.33.10:3000/signup.json", { | |
'user[email]': '[email protected]', | |
'user[password]': 'codeworkout', | |
'user[password_confirmation]': 'codeworkout', | |
}, | |
function(data) { | |
console.dir(data); | |
} | |
); | |
// sign_in | |
$.post( | |
"https://192.168.33.10:3000//users/sign_in.json", { | |
'user[email]': '[email protected]', | |
'user[password]': 'changeme' | |
}, | |
function(data) { | |
console.dir(data); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment