Reputation: 11
I would like to populate the root page with certain items from my database and just have a link to sign in somewhere on the page. Basically I don't want to make the content exclusive to those who are logged in.
Upvotes: 1
Views: 40
Reputation: 1349
In your root controller, just add:
skip_before_filter :authenticate_user!
Example:
class RootController < ApplicationController
skip_before_filter :authenticate_user!
def index
#some logic here
end
end
You can also limit it to just the index action:
skip_before_filter :authenticate_user!, only: [:index]
Good luck!
Upvotes: 2