Why using merge method with scopes isn't working anymore on Rails 3.1?
问题 I stumbled upon a wonderful article about scopes on Rails 3+ : http://edgerails.info/articles/what-s-new-in-edge-rails/2010/02/23/the-skinny-on-scopes-formerly-named-scope/index.html You can read there (in 'Crazy Town' section) that it's possible to merge scopes from different models like this : class User < ActiveRecord::Base scope :published, lambda { joins(:posts).group("users.id") & Post.published } end which works just as expected, and allows you to do : User.published.to_sql #=> SELECT