Hello,
I have an translation of my activerecord attributes and i suppose that
label method should work with it, but it didn't, i.e.:
pl-PL:
activerecord:
attributes:
user:
name: ImiÄ™
surname: Nazwisko
and code from my view:
<% form_for :user, :url => users_path do |f| %>
<%= f.label :name %><%= f.text_field :name %>
<%= f.label :surname %><%= f.text_field :surname %>
<% end %>
After short examinig of ActionView::Helpers::FormHelper#label there is
no usage of human_attribute_name or something similar. Quick & dirty
hack by changeing method call in IstanceTag to something like this do
the trick:
InstanceTag.new(
object_name,
Object::const_get(object_name.to_s.classify).human_attribute_name(method.to_s),
self,
options.delete(:object)).to_label_tag(text, options)
but i think (and in a fact i know ;) that this is crap piece of code,
so my question is - are there any plans to implement such feature into
label method?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"rails-i18n" 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/rails-i18n?hl=en
-~----------~----~----~----~------~----~------~--~---