class, not instance method

This commit is contained in:
Raphael Sofaer 2011-03-11 14:52:10 -08:00
parent 2ff4af6800
commit c256533a2f

View file

@ -1,5 +1,5 @@
class DowncaseTags < ActiveRecord::Migration
def consolidate_tags_with_name(name)
def self.consolidate_tags_with_name(name)
tags = execute("SELECT * FROM tags WHERE tags.name = ?;", name)
keep_tag = tags.pop
tags.each do |bad_tag|