- 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]': 'hshahin1@vt.edu',
'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]': 'user1@example.com',
'user[password]': 'changeme'
},
function(data) {
console.dir(data);
}
);