quote string in migration!
This commit is contained in:
parent
98633658f4
commit
0c31cc4259
1 changed files with 1 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
class DowncaseTags < ActiveRecord::Migration
|
class DowncaseTags < ActiveRecord::Migration
|
||||||
def self.consolidate_tags_with_name(name)
|
def self.consolidate_tags_with_name(name)
|
||||||
tags = execute("SELECT * FROM tags WHERE tags.name = #{name};").to_a
|
tags = execute("SELECT * FROM tags WHERE tags.name = '#{name}';").to_a
|
||||||
keep_tag = tags.pop
|
keep_tag = tags.pop
|
||||||
tags.each do |bad_tag|
|
tags.each do |bad_tag|
|
||||||
execute("UPDATE taggings
|
execute("UPDATE taggings
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue