Remove Rails 4 warnings when using association conditions.