This project is archived and is in readonly mode.

#1675 ✓wontfix
Yaroslav Markin

Pluralized AR models (think Posts.find(:all) instead of Post.find(:all))

Reported by Yaroslav Markin | December 31st, 2008 @ 03:25 PM | in 2.x

Patch introduces pluralized AR models generation. For instance, if you have


class Post < ActiveRecord::Base
end

you'll automatically get Posts object proxy that will call singular class methods.


Posts.find(:all), Posts.all, Posts.find_by_title, Posts.scoped_by_date

are now available automatically ;-)

Not destructive to existent classes/modules.

AS::Dependency modified a bit so that when trying to lookup Posts constant, it will look for both posts.rb and post.rb.

Would love to hear any feedback.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages