If I call a method on a rails active model method like so:
class Foo < ActiveRecord::Base
end
Foo.first
I'll get back the first active record. I don't have to instantiate the class.
But if I create my own class and call a method, I get an exception:
class Person < ActiveRecord::Base
def greeting
'hello'
end
end
Person.greeting
#EXCEPTION: undefined method `greeting' for Person:Class
How can I make that problem go away?