I ran into an issue which ActiveRecord find method creates wrong SQL when you set has_one association which through belong_to association into :join option.
Detail, tests and fix are here. https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/3684-invalid-sql-is-created-when-you-set-has_one-through-association-to-join
Can someone take a look at it and give me thoughts?
Tatsuya