- def preferred_languages
- @languages ||= if params[:locale]
- Locale.list(params[:locale])
- elsif current_user
- current_user.preferred_languages
- else
- Locale.list(http_accept_language.user_preferred_languages)
- end
+ def preferred_languages(reset = false)
+ @preferred_languages = nil if reset
+ @preferred_languages ||= if params[:locale]
+ Locale.list(params[:locale])
+ elsif current_user
+ current_user.preferred_languages
+ else
+ Locale.list(http_accept_language.user_preferred_languages)
+ end