I’m curious if it’s possible to send a Rails 3 application to one website if someone lands on the site as a guest and another website if someone lands on the site as a user.
Is this done in routes? Is this done in the controller-tier?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should consider using sessions. They work like this:
Most people use session[:user_id]
Resources:
http://guides.rubyonrails.org/security.html
http://railscasts.com/episodes/21-super-simple-authentication
http://api.rubyonrails.org/classes/ActionController/Base.html