Skip to content

andrzejkrzywda/rails-spa-devise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

This repo is a simple demonstration how to use devise with a Single Page App.

Conceptually, the Devise views are one modules, while posts/index.html could represent a JS SPA.

posts/index.html is available to anyone, but all it does is initializing some JS. The JS code tries to GET data (ajax) from /posts/index.json. This action has “authorize_user!” in it, so it returns error code. The ‘error’ ajax callback redirects to “users/sign_in”. After logging in, all works fine, thanks to cookies.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published