Rails 4: Replaced call to deprecated `with_scope'

As you can see in the official gem rails/activerecord-deprecated_finders, with_scope has been deprecated.

    ActiveRecord::Base#with_scope and #with_exclusive_scope are deprecated.
    Please use ActiveRecord::Relation#scoping instead. (You can use #merge to merge multiple scopes together.)

This update fixes that problem, by using 'where', 'merge' and 'scoping'.