massa... parece ser simples de utilizar...
On 5 January 2013 18:25, Salvatore Pelligra <[email protected]> wrote: > I'm in this case: > class Man < ActiveRecord::Base > has_many :eyes > accepts_nested_attributes_for :eyes > end > class Eye < ActiveRecord::Base > belongs_to :man > validates_inclusion_of :color, in: { %w[brown green blue] } > end > > Views (in HAML): > = form_for @man do |f| > - if @man.errors.any? > #error_explanation > %h2= t 'errors.messages.record_invalid', count: @man.errors.count > %ul > - @man.errors.full_messages.each do |msg| > %li= msg > > = f.fields_for(:eyes) do |b| > .field > = b.label :color > = b.text_field :color > > .actions > = f.submit 'Send' > > > it.yml: > it: > activerecord: > attributes: > customer/eyes: > color: Colore > errors: > models: > man/eyes: > color: > inclusion: non valido > > However the label of color is not translated (but it is with > 'actviterecord.attributes.eye.color'), the attribute in the error > message is "Eyes" and the rest is not translated... > I'm using Rails 3.6 and digging in the active_model/translations.rb it > seems to manage the model/sub_model syntax. > Someone can give me and hand? Thanks. > > -- > Posted via http://www.ruby-forum.com/. > > -- > 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. > > -- Bruno da Silva João Telecommunication Technician Network Administrator Gmail & Gtalk: [email protected] MSN: [email protected] Fone: +55 (48) 96585472 (TIM) -- 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.
