address ActiveRecord deprecations in Rails 4.0

This backports one of the nice syntax changes from the large 9f7ed58fef0c2be85cce4cc4da96a6db4c9a8886 commit to the `2-2-stable` branch, in order to address a deprecation warning currently triggered by the `2-1-stable` branch.