quote string in migration!

This commit is contained in:
Raphael Sofaer 2011-03-11 15:00:15 -08:00
parent 98633658f4
commit 0c31cc4259

View file

@ -1,6 +1,6 @@
class DowncaseTags < ActiveRecord::Migration
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
tags.each do |bad_tag|
execute("UPDATE taggings