Hi,
> - - Language switches correctly in development mode, including the
> enum_string field
> - - Language switches correctly in production mode, *except* for the
> enum_string field, which stays in the first language loaded (sometimes
> spanish, sometimes english, depending on the param provided in the
> first petition).
Current enum_string implementation doesn't consider locale switching.
As a workaround, you can re-initialize the enum_string on every
request in your application_controller:
prepend_before_filter :force_random_locale
def force_random_locale
I18n.locale = ("aa".."zz").to_a[rand(676)]
Region.with_values(*Region.values)
end
But it may produce strange results in threaded environment.
-----
Tomoaki Hayasaka <[email protected]>
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.