]> source.dussan.org Git - redmine.git/commitdiff
Code cleanup, removed raw SQL.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 28 Oct 2014 18:43:11 +0000 (18:43 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 28 Oct 2014 18:43:11 +0000 (18:43 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13522 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/document_category.rb
app/models/issue_priority.rb

index 4bfbba493b3e389b7196058a731eb2d93a81c8e0..c84d27e8b4dd246b8d6e38f116681dcc406b2017 100644 (file)
@@ -29,7 +29,7 @@ class DocumentCategory < Enumeration
   end
 
   def transfer_relations(to)
-    documents.update_all("category_id = #{to.id}")
+    documents.update_all(:category_id => to.id)
   end
 
   def self.default
index 182235cb630cfe582fcb5b3d48980692b9ae24ec..1e00cc01fb8b4bde93bde665a7acabcff418366d 100644 (file)
@@ -32,7 +32,7 @@ class IssuePriority < Enumeration
   end
 
   def transfer_relations(to)
-    issues.update_all("priority_id = #{to.id}")
+    issues.update_all(:priority_id => to.id)
   end
 
   def css_classes