Rails 4 compatibility
Remove deprecated ActiveRecord query syntax