I've got code similar to
class Article < ActiveRecord::Base
has_many :comments
scope :with_comments, joins(:comments)
end
based on this answer, but when I use it in Rails 4.2, I get
/Users/agrimm/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activerecord-4.2.0/lib/active_record/scoping/named.rb:143:in `scope': The scope body needs to be callable. (ArgumentError)
Have the rules with regards to allowing joins in scope changed between Rails 4 and Rails 4.2? I can see mention of joins in the 4.2 release notes, but I can't tell if it's applicable here.