tags as array in migration

This commit is contained in:
Raphael Sofaer 2011-03-11 14:57:46 -08:00
parent 20d40b7440
commit 70e4a671a2

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};")
tags = execute("SELECT * FROM tags WHERE tags.name = #{name};").to_a
keep_tag = tags.pop
tags.each do |bad_tag|
execute("UPDATE taggings