OOPS: Left first try at skipping it in migrations

This commit is contained in:
Robin Ward 2015-11-14 16:13:02 -05:00
parent 810a069cfd
commit 5234e54f7e
1 changed files with 2 additions and 2 deletions

View File

@ -5,9 +5,9 @@ class AddLoungeCategory < ActiveRecord::Migration
I18n.backend.overrides_disabled do
result = Category.exec_sql "SELECT 1 FROM site_settings where name = 'lounge_category_id'"
if result.count == 0
description = I18n.t('vip_category_description', skip_overrides: true)
description = I18n.t('vip_category_description')
default_name = I18n.t('vip_category_name', skip_overrides: true)
default_name = I18n.t('vip_category_name')
name = if Category.exec_sql("SELECT 1 FROM categories where name = '#{default_name}'").count == 0
default_name
else