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. =)
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. =)
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! =)
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.
Nicely done, applied.