adds version check to remove deprecation warnings
Uses Model.all if Rails 4, instead of the deprecated Model.scoped
uses model.all if rails version >= 4.1
Merge pull request #255 from xuanxu/remove-deprecation-warning

Prevent deprecation warning in Rails 4