Makes ActiveRecord dependency Rails 4 compliant