On 16.04.2011 00:06, Michael Koziarski wrote:
You're projecting your own use case onto all users of all dynamic finders.
@blog.posts.random.find_by_category("cool") # where random is
order('rand()') or similar
That's a perfectly valid use and would no longer be supported by what
you're proposing.
Ok, I didn't think of such a use case. I suggest to make people use one
of the following code snippets for this use case in rails 3.1:
@blog.posts.random.find_all_by_category("cool").first
or
@blog.posts.random.find_first_by_category("cool")
This would make much clearer what happens behind the scenes. The
"normal" dynamic finders should then work as described before.
Corin
--
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en.