Michael Koziarski wrote:
>> Are their other dangers with such a definition that makes
>> you uncomfortable?
> 
> I just don't think that the feature justifies adding such strange and
> counter-intuitive syntax.  I'm all for adding methods to core classes
> that aid developers, every day.  Things like 1.day.ago etc but just
> for this one case it's not justified.

In my view the :assoc[:attr1, :attr2] is the most intuitive
way of selecting attributes for for eager-loaded associations,
naturally extending the existing syntax.

The alternatives are:

1. Parsing the :select option,
2. Not providing the ability to restrict attribute selection, or
3. A less-streamlined but more convention syntax that has the same
    effect: e.g. Adding an ActiveRecord class method "eager_select":

:include => {eager_select(:books, :title, :stock, :price) => :author}

-- 
We develop, watch us RoR, in numbers too big to ignore.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to