Files
grecia/db/migrate/20181214094002_add_budget_investment_translations.rb
Senén Rodero Rodríguez eefb9ca4f7 Add budget investment translations
Also fix sort_by_title method [1]

[1] Use ruby sort instead of active record order scope because Globalize
does not provide a way to search over all available fallbacks when
translation for current locale does not exist.
2019-06-27 09:20:24 +02:00

16 lines
338 B
Ruby

class AddBudgetInvestmentTranslations < ActiveRecord::Migration[4.2]
def self.up
Budget::Investment.create_translation_table!(
{
title: :string,
description: :text
},
{ migrate_data: true }
)
end
def self.down
Budget::Investment.drop_translation_table!
end
end