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.
This commit is contained in:
committed by
voodoorai2000
parent
8c2f1b894d
commit
eefb9ca4f7
@@ -0,0 +1,15 @@
|
||||
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
|
||||
Reference in New Issue
Block a user