diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-02 20:23:48 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-02 20:23:48 +0000 |
commit | 536747b74708188848d85d8de5df34e7aa762006 (patch) | |
tree | c7cfe03314c047dff313825c8548d056e5e1af29 /lib/redmine/default_data | |
parent | 96fca0b08f6d60e8736e8e3f95a5d0ae33779068 (diff) | |
download | redmine-536747b74708188848d85d8de5df34e7aa762006.tar.gz redmine-536747b74708188848d85d8de5df34e7aa762006.zip |
Replaces find(:all) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10917 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/default_data')
-rw-r--r-- | lib/redmine/default_data/loader.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/redmine/default_data/loader.rb b/lib/redmine/default_data/loader.rb index a91f6e22c..70629e9d3 100644 --- a/lib/redmine/default_data/loader.rb +++ b/lib/redmine/default_data/loader.rb @@ -139,15 +139,15 @@ module Redmine rejected = IssueStatus.create!(:name => l(:default_issue_status_rejected), :is_closed => true, :is_default => false, :position => 6) # Workflow - Tracker.find(:all).each { |t| - IssueStatus.find(:all).each { |os| - IssueStatus.find(:all).each { |ns| + Tracker.all.each { |t| + IssueStatus.all.each { |os| + IssueStatus.all.each { |ns| WorkflowTransition.create!(:tracker_id => t.id, :role_id => manager.id, :old_status_id => os.id, :new_status_id => ns.id) unless os == ns } } } - Tracker.find(:all).each { |t| + Tracker.all.each { |t| [new, in_progress, resolved, feedback].each { |os| [in_progress, resolved, feedback, closed].each { |ns| WorkflowTransition.create!(:tracker_id => t.id, :role_id => developer.id, :old_status_id => os.id, :new_status_id => ns.id) unless os == ns @@ -155,7 +155,7 @@ module Redmine } } - Tracker.find(:all).each { |t| + Tracker.all.each { |t| [new, in_progress, resolved, feedback].each { |os| [closed].each { |ns| WorkflowTransition.create!(:tracker_id => t.id, :role_id => reporter.id, :old_status_id => os.id, :new_status_id => ns.id) unless os == ns |