remove find or create by name

This commit is contained in:
Tyrel Souza 2014-02-13 15:45:12 -05:00
parent f251500aa4
commit 1bf0e8b94e

View File

@ -2,9 +2,4 @@ class LocalezeCategory < ActiveRecord::Base
attr_accessible :name
has_and_belongs_to_many :list_entries
def self.find_or_create_by_name(name, &block)
obj = self.find_or_create_by_name( name ) || self.new(:name => name)
yield obj
obj.save
end
end