rails/activerecord-deprecated_finders — pull request #24 by stopdropandrew (2014-09-06 18:19:48+00:00)
Title: Fix scope chaining

Currently when chaining a deprecated scope, because of the [unscoped call](https://github.com/rails/activerecord-deprecated_finders/blob/master/lib/active_record/deprecated_finders/base.rb#L46) all previous scopes are destroyed.

This also manifests itself for scopes defined on the top level of STI classes from subclasses.

Ex:
```ruby
class Post < ActiveRecord::Base
self.table_name = 'posts'
scope :foo, -> { where(:foo) }
scope :bar, conditions: :bar
end

Post.foo.bar.to_sql
=> "SELECT \"posts\".* FROM \"posts\" WHERE ('bar')"

Post.bar.foo.to_sql
=> "SELECT \"posts\".* FROM \"posts\" WHERE ('bar') AND ('foo')"
```