I was just wondering, cause with preload associations wouldn't be a problem to support those keys. So if no problem actually exists, I'm offering myself to do a patch. =)
on 2008-05-22 18:08
on 2008-05-22 19:15
Ok! I was out of my mind! My problem is really with the :select key and I just thought, why not include others also? =P :group, :offset and :limit keys don't make sense. So, changing my question: why belongs_to and has_one doesn't support :select options? Really, we only have to change 2 lines of code! =)
on 2008-05-22 21:52
Actually, I'm not the only one crazy! =)
Does anyone know why belongs_to accepts :order?
Cause it isn't even in the find_target method (active_record/
associations/belongs_to_association.rb, line 43)
def find_target
@reflection.klass.find(
@owner[@reflection.primary_key_name],
:conditions => conditions,
:include => @reflection.options[:include],
:readonly => @reflection.options[:readonly]
)
end
Thanks,
José Valim.
on 2008-05-24 08:02
Nicely done, applied. On Fri, May 23, 2008 at 7:51 AM, José Valim <jose.valim@gmail.com> wrote: > :conditions => conditions, >> My problem is really with the :select key and I just thought, why not >> >> > I was just wondering, cause with preload associations wouldn't be a >> > problem to support those keys. >> >> > So if no problem actually exists, I'm offering myself to do a patch. =) > > > -- Cheers Koz