Basically, all my tables look like this:
create_table “countries”, :force => true do |t|
t.string “name_en”
t.string “name_ja”
end
If the locale is set to ‘en’, I want Country.name to return
Country.name_en. Is there a way to do this?
Rich
Basically, all my tables look like this:
create_table “countries”, :force => true do |t|
t.string “name_en”
t.string “name_ja”
end
If the locale is set to ‘en’, I want Country.name to return
Country.name_en. Is there a way to do this?
Rich
Rich Pav a écrit :
Basically, all my tables look like this:
create_table “countries”, :force => true do |t|
t.string “name_en”
t.string “name_ja”
endIf the locale is set to ‘en’, I want Country.name to return
Country.name_en. Is there a way to do this?
You are looking for the great translatable_columns plugin by Iain :
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs