Skip to content

Instantly share code, notes, and snippets.

@hosamshahin
Last active April 5, 2016 19:45
Show Gist options
  • Save hosamshahin/fbf9c589494d73bdae7f08267562cb3a to your computer and use it in GitHub Desktop.
Save hosamshahin/fbf9c589494d73bdae7f08267562cb3a to your computer and use it in GitHub Desktop.
- 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