Prevent deprecation warning in Rails 4

When running master with Rails 4 we get this:
```
DEPRECATION WARNING: Model.scoped is deprecated. Please use Model.all instead.
```
This PR changes active_record.rb to use `Model.all` instead of the deprecated `Model.scoped` if possible