Ruby on Rails Saturday, November 8, 2014

I have cargo form with dropdown menu in simple_forms, which is populated from model cargo_price:

<%= f.association :cargo_price, :label_method => :price, :value_method => :id %>


There is model called cargo_price with only ID and price columns, price column has 3 values (these values are populated to dropdown menu via that association) . I would like to i18n this populated menu. Is there any best practice for such a case? I tried without success to put translation to yaml file:

en:
  simple_forms
:
    options
:
      price
:
        allin
: 'All in'
        pp
: '40 PlusPLus'
        makeoffer
: 'Offer'


thanx a lot

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ea1a632e-3d04-4abc-a64f-ed3436d62d0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment