I have a website and a Rails app.
When a user goes to the website, I want to check if they are logged in or not. If they are, I want to send them to the Rails application. If they are not logged in I want to send them to the website.
pivotaltracker.com has this type of behavior.
What's the best way to go about this? I figure the Rails app needs to do the log in check so it seems the user should always be sent there first and redirect to the website if not logged in?
But it seems like more often than not the result will be to display the website, so it seems like this adds an extra step, and slows things down for the majority of users. But I'm not sure how else to do it.
Any ideas?