Reputation: 7078
I got a user model method called "has_separate_emails?
".
Normaly i do somethink like this:
Users.select{ |user| user.has_separate_emails? }
but i wrapped it up to this:
Users.select(&:has_separate_emails?)
the negate version would be:
Users.select{ |user| !user.has_separate_emails? }
And now the question, is there also a shorter/"wrapped" version for negated statements?
Upvotes: 2
Views: 66