In trying to diagnose an error I was getting, I found
These both patch the construct_scope methods in the ActiveRecord
association classes to pass through the @reflection.options for the
My problem was the :include wasn't getting sent through and my order
was then failing since it used a field retrieved from the include.
Can anyone see a reason why :include shouldn't be send through as
well? I've done a quick fix on my system and it solved my problem,
but before I try to submit a patch I wanted to see if anyone knew a
reason it wasn't?
Also, do you think the patch should try to be smart and just send
through @reflection.options in general so in the future we don't have
to forget adding an option to these few different classes?
An aside: I noticed that the find_or_create_by doesn't suppose the
passing of any options, unless the find_by -- e.g.
find_or_create_by_title_id(@title.id, :include => :title) doesn't
work. Should it? find_by_title_id(@title.id, :include => :title)
Thanks for your time,