提交 1b5b53da 编写于 作者: A Aaron Patterson

common @jonleighton 💣

上级 f0e198bf
...@@ -13,8 +13,7 @@ def self.limit_by(l) ...@@ -13,8 +13,7 @@ def self.limit_by(l)
end end
def self.with_authors_at_address(address) def self.with_authors_at_address(address)
where('authors.author_address_id = ?', address.id) where('authors.author_address_id = ?', address.id).joins('JOIN authors ON authors.id = posts.author_id')
.joins('JOIN authors ON authors.id = posts.author_id')
end end
belongs_to :author do belongs_to :author do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册