Why MyModel.all works in Rails ?
- by AntonAL
Hi,
i don't understand this little thing:
Suppose, we have "Person" model
class Person < ActiveRecord::Base
end
Why Person.all works ?
Person.all.each { |p| do_something }
This syntax tells us, that we have Person class-object instanciated somewhere ?
Or is it some convention over configuration case ?