Make sure that if you are using devise with a locale field like so:
User Locale
I18n.locale = current_user.locale
It important to check if current_user is nil before setting the locale. If you're using devise, placing this code in your application controller without checking will cause not-logged in user's pages to crash.
+1
Make sure that if you are using devise with a locale field like so:
It important to check if current_user is nil before setting the locale. If you're using devise, placing this code in your application controller without checking will cause not-logged in user's pages to crash.