0

I'm using the Administrate gem to set up my Admin page. I have successfully done so and generated this Admin Page:

Admin Page

Now I want to create a Home Page that my login page will redirect to after users successfully logged in. How can I do that? Thanks!

James
  • 1
  • 1

1 Answers1

1

you can use gem Devise https://github.com/plataformatec/devise for authentication.

Devise will create some helpers to use inside your controllers and views. To set up a controller with user authentication, just add this before_action (assuming your devise model is 'User'):

before_action :authenticate_user!
Lee
  • 418
  • 2
  • 8