Mercurial > hg > soundsoftware-site
comparison .svn/pristine/ad/ad957ccce8d55237a463953923542a0cf137f251.svn-base @ 1464:261b3d9a4903 redmine-2.4
Update to Redmine 2.4 branch rev 12663
author | Chris Cannam |
---|---|
date | Tue, 14 Jan 2014 14:37:42 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1296:038ba2d95de8 | 1464:261b3d9a4903 |
---|---|
1 class SupportForMultipleCommitKeywords < ActiveRecord::Migration | |
2 def up | |
3 # Replaces commit_fix_keywords, commit_fix_status_id, commit_fix_done_ratio settings | |
4 # with commit_update_keywords setting | |
5 keywords = Setting.where(:name => 'commit_fix_keywords').limit(1).pluck(:value).first | |
6 status_id = Setting.where(:name => 'commit_fix_status_id').limit(1).pluck(:value).first | |
7 done_ratio = Setting.where(:name => 'commit_fix_done_ratio').limit(1).pluck(:value).first | |
8 if keywords.present? | |
9 Setting.commit_update_keywords = [{'keywords' => keywords, 'status_id' => status_id, 'done_ratio' => done_ratio}] | |
10 end | |
11 Setting.where(:name => %w(commit_fix_keywords commit_fix_status_id commit_fix_done_ratio)).delete_all | |
12 end | |
13 | |
14 def down | |
15 Setting.where(:name => 'commit_update_keywords').delete_all | |
16 end | |
17 end |