diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-02-09 17:24:06 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-02-09 17:24:06 +0000 |
commit | c68721911370e2aa293fd951b933b5c7f74fd611 (patch) | |
tree | 0c4ef88c18d25040434d266197f4821ab1e8d68d /app/models/role.rb | |
parent | 27e3b31c1ef509506046f356b11877d064afea2d (diff) | |
download | redmine-c68721911370e2aa293fd951b933b5c7f74fd611.tar.gz redmine-c68721911370e2aa293fd951b933b5c7f74fd611.zip |
Removes hardcoded table names (#2701).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2424 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/role.rb')
-rw-r--r-- | app/models/role.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/role.rb b/app/models/role.rb index beb13c03b..b07e7a039 100644 --- a/app/models/role.rb +++ b/app/models/role.rb @@ -31,9 +31,9 @@ class Role < ActiveRecord::Base raise "Can not copy workflow from a #{role.class}" unless role.is_a?(Role) raise "Can not copy workflow from/to an unsaved role" if proxy_owner.new_record? || role.new_record? clear - connection.insert "INSERT INTO workflows (tracker_id, old_status_id, new_status_id, role_id)" + + connection.insert "INSERT INTO #{Workflow.table_name} (tracker_id, old_status_id, new_status_id, role_id)" + " SELECT tracker_id, old_status_id, new_status_id, #{proxy_owner.id}" + - " FROM workflows" + + " FROM #{Workflow.table_name}" + " WHERE role_id = #{role.id}" end end |