I’m having a little trouble understanding the differences and knowing
when to use “def foo” and “def self.foo” in my models. I don’t quite
understand them and was hoping someone could explain or give me
examples on how to use the “self.” properly.
For example, I had “def foo” in my model “Account” and in one of my
views I tried doing “<%= Account.foo %>” but it didn’t work, but when
I changed it to “def self.foo” it did. But I don’t know why.
Thanks for the help.