ruby on rails - Displaying website when not logged in, and displaying app when logged in -
i have website , rails app.
when user goes website, want check if logged in or not. if are, want send them rails application. if not logged in want send them website.
pivotaltracker.com has type of behavior.
what's best way go this? figure rails app needs log in check seems user should sent there first , redirect website if not logged in?
but seems more not result display website, seems adds step, , slows things down majority of users. i'm not sure how else it.
any ideas?
check app session cookie in web server layer of web site, send them app if have it, continue web site if not.
of course, app implement actual check find logged-in users , redirect web site if smells funny.
yes, it's more complex.
or, stop trying optimise things before measure them. "it seems" implies haven't checked numbers happens more often. (that came off snarkier intended. i'm trying remind "premature optimisation", not trying yell @ it.)
Comments
Post a Comment