diff options
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb b/db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb new file mode 100644 index 0000000..6bbac04 --- /dev/null +++ b/db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb @@ -0,0 +1,11 @@ +class AddMobileMaxStringLengthParameter < ActiveRecord::Migration + def up + GsParameter.create(:name => 'MOBILE_MAX_STRING_LENGTH', :section => 'HTML', :value => '8', :class_type => 'Integer', :description => 'Max length of a string on a mobile devise.') + GsParameter.create(:name => 'DESKTOP_MAX_STRING_LENGTH', :section => 'HTML', :value => '30', :class_type => 'Integer', :description => 'Max length of a string on a desktop devise.') + end + + def down + GsParameter.where(:name => 'MOBILE_MAX_STRING_LENGTH').destroy_all + GsParameter.where(:name => 'DESKTOP_MAX_STRING_LENGTH').destroy_all + end +end |