diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-05 23:01:16 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-05 23:01:16 +0100 |
commit | ddb3dfa92ec0878240211cb2b7a8e125961b1360 (patch) | |
tree | 0111ac9f589d97503046d9a81cd3af841e17501d /db | |
parent | e76890d5f4634d47514a592d501d9792ae2ff7bb (diff) |
Moved to GsParemeter.get and set defaults for a couple of validations.
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20120105120126_create_gs_parameters.rb (renamed from db/migrate/20130105120126_create_gs_parameters.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20120105120353_populate_gs_parameter_with_defaults.rb (renamed from db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb) | 0 | ||||
-rw-r--r-- | db/schema.rb | 9 | ||||
-rw-r--r-- | db/to-dos/20120119160732_emergency_numbers_germany.rb | 4 |
4 files changed, 7 insertions, 6 deletions
diff --git a/db/migrate/20130105120126_create_gs_parameters.rb b/db/migrate/20120105120126_create_gs_parameters.rb index b8b915b..b8b915b 100644 --- a/db/migrate/20130105120126_create_gs_parameters.rb +++ b/db/migrate/20120105120126_create_gs_parameters.rb diff --git a/db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb b/db/migrate/20120105120353_populate_gs_parameter_with_defaults.rb index a4c9358..a4c9358 100644 --- a/db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb +++ b/db/migrate/20120105120353_populate_gs_parameter_with_defaults.rb diff --git a/db/schema.rb b/db/schema.rb index 2a5c267..832f001 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 => 20130105093128) do +ActiveRecord::Schema.define(:version => 20121230110747) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" @@ -529,10 +529,11 @@ ActiveRecord::Schema.define(:version => 20130105093128) do create_table "gs_parameters", :force => true do |t| t.string "name" t.string "section" - t.string "value" + t.text "value" t.string "class_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "gui_function_memberships", :force => true do |t| diff --git a/db/to-dos/20120119160732_emergency_numbers_germany.rb b/db/to-dos/20120119160732_emergency_numbers_germany.rb index 9dd9131..f0c02d9 100644 --- a/db/to-dos/20120119160732_emergency_numbers_germany.rb +++ b/db/to-dos/20120119160732_emergency_numbers_germany.rb @@ -11,7 +11,7 @@ class EmergencyNumbersGermany < ActiveRecord::Migration ################################################################ # Emergency numbers which shouldn't be used as extensions ################################################################ - notruf_nummern = germany.phone_number_ranges.find_or_create_by_name(SERVICE_NUMBERS) + notruf_nummern = germany.phone_number_ranges.find_or_create_by_name(GsParameter.get('SERVICE_NUMBERS')) notruf_nummern.phone_numbers.find_or_create_by_name_and_number('Polizei', '110') notruf_nummern.phone_numbers.find_or_create_by_name_and_number('Feuerwehr', '112') notruf_nummern.phone_numbers.find_or_create_by_name_and_number('Zentrale Behördenrufnummer', '115') @@ -25,6 +25,6 @@ class EmergencyNumbersGermany < ActiveRecord::Migration def down germany = Country.find_by_name('Germany') - germany.phone_number_ranges.where(:name => SERVICE_NUMBERS).destroy_all + germany.phone_number_ranges.where(:name => GsParameter.get('SERVICE_NUMBERS')).destroy_all end end |