diff --git a/activerecord/test/models/post.rb b/activerecord/test/models/post.rb index 7055380d85fe8c9d3587117391274a1b13b09453..a91c10276b2ec9b0665d7e9c28374496918bdf4a 100644 --- a/activerecord/test/models/post.rb +++ b/activerecord/test/models/post.rb @@ -13,8 +13,7 @@ def self.limit_by(l) end def self.with_authors_at_address(address) - where('authors.author_address_id = ?', address.id) - .joins('JOIN authors ON authors.id = posts.author_id') + where('authors.author_address_id = ?', address.id).joins('JOIN authors ON authors.id = posts.author_id') end belongs_to :author do