From ea3df5a7eb079982a8fcda3df572a0d1433b7f52 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 13:49:44 +0100 Subject: Better UI on mobile phones. --- .../20130124123128_add_mobile_max_string_length_parameter.rb | 11 +++++++++++ db/schema.rb | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb (limited to 'db') 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 diff --git a/db/schema.rb b/db/schema.rb index 17563b1..6365e6d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130124105613) do +ActiveRecord::Schema.define(:version => 20130124123128) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" -- cgit v1.2.3