I have a class method that I would like to return a error from, is something like this possible?
class Foo < ActiveRecord::Base
def self.do_this
if b = Bar.find_by_id(5)
return 'Yea'
else
self.errors.add_to_base('I was not found')
end
end
end