开发者

Where are activerecord object APIs located?

I'm looking at some ruby code in rails, which looks like:

user.jobs.order('created_at').not_closed.page(5)

In ActiveRecord::Base, I don't see any any "not_closed", "page", or "order" methods in the API. Wha开发者_如何学编程t possible places can these methods originate?


order is a core ActiveRecord method.

not_closed most likely, should be in the Job model (apps/models/job.rb).

page could be in the Jobs model, or in an external gem/plugin (probably pagination related).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜