Removes hardcoded table names (#2701).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2424 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
27e3b31c1e
commit
c687219113
|
@ -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
|
||||
|
|
|
@ -23,9 +23,9 @@ class Tracker < ActiveRecord::Base
|
|||
raise "Can not copy workflow from a #{tracker.class}" unless tracker.is_a?(Tracker)
|
||||
raise "Can not copy workflow from/to an unsaved tracker" if proxy_owner.new_record? || tracker.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 #{proxy_owner.id}, old_status_id, new_status_id, role_id" +
|
||||
" FROM workflows" +
|
||||
" FROM #{Workflow.table_name}" +
|
||||
" WHERE tracker_id = #{tracker.id}"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue