Amended syntax to work with ActiveRecord in Rails 4 (3m)