Open ydakuka opened 1 year ago
I suggest to add paragraph about using method .none().
Let's say we have the following samples:
User.where(id: nil) User.where(id: 0) User.where(id: []) User.where(id: {}) User.limit(nil) User.limit(0)
All these lines can be replaced with the code:
User.none
Are those other approaches common? Perhaps you could check on https://github.com/eliotsykes/real-world-rails
I suggest to add paragraph about using method .none().
Let's say we have the following samples:
All these lines can be replaced with the code: