If I have a method "bar" on a model "Foo", this should not work right?
Foo.all.bar
Should be this?
Foo.all.each {|foo| Foo.bar }
If I have a method "bar" on a model "Foo", this should not work right?
Foo.all.bar
Should be this?
Foo.all.each {|foo| Foo.bar }
Oops, I meant Foo.all.each {|foo| foo.bar } for the second one.
Samson Oak wrote in post #1151218:
Oops, I meant Foo.all.each {|foo| foo.bar } for the second one.
Yes, second one should work as your method is a instance method Thanks. Manoj Menon,