Suppose I have a Rails model: class Project < ActiveRecord::Base
In the Rails console:
> Project.all
=> #
There are actually two questions you are asking:
@arieljuod has already given you some explanations and a link.
However the second question is still unanswered.
There is another similar question exists which I hope will help you find all the answers:
How can an ActiveRecord::Relation object call class methods
It looks like the two questions (by the link and yours one) answer each other )
Take a look at @nikita-shilnikov's answer. Good luck in your investigation!