Show More
Commit Description:
Merged online-registration branch changes r297:303 into the trunk...
Commit Description:
Merged online-registration branch changes r297:303 into the trunk
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@303 6386c4cd-e34a-4fa8-8920-d93eb39b512e
References:
File last commit:
Show/Diff file:
Action:
db/migrate/20081204081043_add_more_options_to_configurations.rb
| 31 lines
| 1.1 KiB
| text/x-ruby
| RubyLexer
|
|
r155 | class AddMoreOptionsToConfigurations < ActiveRecord::Migration | ||
def self.up | ||||
# If the server is in contest mode and | ||||
# Configuration['contest.multisites'] is true | ||||
# the menu for site administrator is shown. | ||||
Configuration.create(:key => 'contest.multisites', | ||||
:value_type => 'boolean', | ||||
:value => 'false') | ||||
# If Configuration['system.online_registration'] is true, | ||||
# the registration menu would appear | ||||
Configuration.create(:key => 'system.online_registration', | ||||
:value_type => 'boolean', | ||||
:value => 'false') | ||||
|
r156 | |||
# If Configuration['system.user_setting_enabled'] is true, | ||||
# users can change their settings | ||||
Configuration.create(:key => 'system.user_setting_enabled', | ||||
:value_type => 'boolean', | ||||
:value => 'true') | ||||
|
r155 | end | ||
def self.down | ||||
Configuration.find_by_key('contest.multisites').destroy | ||||
Configuration.find_by_key('system.online_registration').destroy | ||||
|
r156 | Configuration.find_by_key('system.user_setting_enabled').destroy | ||
|
r155 | end | ||
end | ||||