Merge pull request #3203 from fantasticfears/seed

FIX: respect default locale settings when seed
This commit is contained in:
Régis Hanol 2015-03-19 12:14:30 +01:00
commit b071bd3c7c

View File

@ -1,6 +1,10 @@
# we need to run seed_fu every time we run rake db:migrate
task 'db:migrate' => 'environment' do
# we should set the locale before the migration
task 'set_locale' do
I18n.locale = (SiteSetting.default_locale || :en) rescue :en
end
# we need to run seed_fu every time we run rake db:migrate
task 'db:migrate' => ['environment', 'set_locale'] do
SeedFu.seed
if SiteSetting.vacuum_db_days > 0 &&