Show More
Commit Description:
removed caching on Configuration...
Commit Description:
removed caching on Configuration
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@285 6386c4cd-e34a-4fa8-8920-d93eb39b512e
References:
File last commit:
Show/Diff file:
Action:
db/migrate/036_add_mode_to_configurations.rb
| 17 lines
| 482 B
| text/x-ruby
| RubyLexer
|
|
r122 | class AddModeToConfigurations < ActiveRecord::Migration | ||
def self.up | ||||
# Configuration['system.mode']: | ||||
# * 'standard' mode | ||||
# * 'contest' mode (check site start time/stop time) | ||||
# * 'analysis' mode (show results, no new submissions) | ||||
Configuration.create(:key => 'system.mode', | ||||
:value_type => 'string', | ||||
:value => 'standard') | ||||
end | ||||
def self.down | ||||
Configuration.find_by_key('system.mode').destroy | ||||
end | ||||
end | ||||