summaryrefslogtreecommitdiff
path: root/db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb
blob: 6bbac04147236847eebd0e76e37e5f666b62b520 (plain)
1
2
3
4
5
6
7
8
9
10
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