
select_tag using I18n.available_locales and I18n.locale
Reported by Johannes Bloch | April 27th, 2009 @ 11:00 PM
Using rails 2.3.2
This select tag will never select a locale because the values in I18n.available_locales are symbols and I18n.locale is String
<%= select_tag 'locale', options_for_select(I18n.available_locales, I18n.locale),:onchange => 'this.form.submit()' %>
You have to rewrite it to
<%= select_tag 'locale', options_for_select(I18n.available_locales, I18n.locale.to_sym),:onchange => 'this.form.submit()' %>
Comments and changes to this ticket
-
RobertHowie August 27th, 2019 @ 04:03 PM
A lighthouse project and all elements are met for the exact use of the offers for the individuals. The margin of the solution and top rated essay writing websites is pursued the full employment of the offs for the individuals. It is done for the fundamental path for the students.
-
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Repository for collecting Locale data for Ruby on Rails I18n as well as other interesting, Rails related I18n stuff