Adds a befor filter to the controller that includes that module calling to the method UbiquoAuthentication::Extensions::Controller.set_ubiquo_locale.
# File vendor/plugins/ubiquo_authentication/lib/ubiquo_authentication/extensions/controller.rb, line 7 7: def self.included(klass) 8: klass.before_filter :set_ubiquo_locale 9: end
sets the rails I18n locale that the user has selected in their user profile.If none selected (or ‘use default locale’ option) this will set the Ubiquo.default_locale(see ubiquo_core doc) value as the selected locale.
# File vendor/plugins/ubiquo_authentication/lib/ubiquo_authentication/extensions/controller.rb, line 15
15: def set_ubiquo_locale
16: return true unless logged_in?
17: user_locale = current_ubiquo_user.locale
18: user_locale = nil if user_locale.blank?
19: I18n.locale = user_locale || Ubiquo.default_locale
20: true
21: end
Disabled; run with $DEBUG to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.