Translations of column in same table

Friday, July 4, 2014

I have small table:



create_table :posts do |t|
t.string :name
end


I need to internationalize name column. I don't want create separate table for this. Is it possible to add columns for translations to table 'post'? In result I want that migration of this table looks like this:



create_table :posts do |t|
t.string :en_name
t.string :de_name
t.string :fr_name
end


Currently I'm trying to use globalize gem, maybe I should use some other solution for this, please, advise.







http://ift.tt/1kldfmG