Rails 4: Change scoped conditions to where