Search code examples
ruby-on-railsauthenticationdevisebefore-filter

Devise authentication error when entering site's root first time


When user enters our web site's root or logs out, Devise authentication displays "You need to sign in or sign up before continuing" the first time. After page reload this message disappears.

Root of our web site is set to controller which has:

before_filter :authenticate_user!

We need this controller to be the root. How to eliminate this message?


Solution

  • I did not find the solution better than defining

    unauthenticated: ''
    

    in /config/locales/devise.en.yml file.