RailsCasts Pro episodes are now free!

Learn more or hide this

Aaron's Profile

GitHub User: astorrer

Site: http://www.astorrer.info

Comments by Aaron


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.