I have a Rails 3 App.
When the user is not signed in… I want devise to show non-signed in pages: SignIn, register, about us, blog etc…
When a user is signed in I want it to go to the web app
where do I make this switch and how do I set it up? thanks
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.
This is easy! I just finished a Rails 3 app with devise, so my pain can be your gain. Just include the
before_filterat the beginning of the controllers you want to protect. Let’s use the example of a Videos controller:You can also pick and choose what actions in the controller are filtered:
Devise gives you the
authenticate_user!method, and redirects for you.