@@ -31,9 +31,9 class Role < ActiveRecord::Base | |||
|
31 | 31 | raise "Can not copy workflow from a #{role.class}" unless role.is_a?(Role) |
|
32 | 32 | raise "Can not copy workflow from/to an unsaved role" if proxy_owner.new_record? || role.new_record? |
|
33 | 33 | clear |
|
34 |
connection.insert "INSERT INTO |
|
|
34 | connection.insert "INSERT INTO #{Workflow.table_name} (tracker_id, old_status_id, new_status_id, role_id)" + | |
|
35 | 35 | " SELECT tracker_id, old_status_id, new_status_id, #{proxy_owner.id}" + |
|
36 |
" FROM |
|
|
36 | " FROM #{Workflow.table_name}" + | |
|
37 | 37 | " WHERE role_id = #{role.id}" |
|
38 | 38 | end |
|
39 | 39 | end |
@@ -23,9 +23,9 class Tracker < ActiveRecord::Base | |||
|
23 | 23 | raise "Can not copy workflow from a #{tracker.class}" unless tracker.is_a?(Tracker) |
|
24 | 24 | raise "Can not copy workflow from/to an unsaved tracker" if proxy_owner.new_record? || tracker.new_record? |
|
25 | 25 | clear |
|
26 |
connection.insert "INSERT INTO |
|
|
26 | connection.insert "INSERT INTO #{Workflow.table_name} (tracker_id, old_status_id, new_status_id, role_id)" + | |
|
27 | 27 | " SELECT #{proxy_owner.id}, old_status_id, new_status_id, role_id" + |
|
28 |
" FROM |
|
|
28 | " FROM #{Workflow.table_name}" + | |
|
29 | 29 | " WHERE tracker_id = #{tracker.id}" |
|
30 | 30 | end |
|
31 | 31 | end |
General Comments 0
You need to be logged in to leave comments.
Login now