Actions
Refactor #29710
closedChange false where conditions to `none`
Description
There are multiple places where we use conditions like "where(1=0)" or "where(id<0)" etc. because we want to preserve the active relation object. Since Rails 4 there is `none` method that achieves the same goal with null object pattern, so the eventual query won't even be sent to the DB - https://api.rubyonrails.org/classes/ActiveRecord/QueryMethods.html#method-i-none
Updated by The Foreman Bot almost 5 years ago
- Status changed from New to Ready For Testing
- Assignee set to Tomer Brisker
- Pull request https://github.com/theforeman/foreman/pull/7641 added
Updated by Tomer Brisker over 4 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|cd4b1820bd38e888500f2b2f31b65f22857ade5e.
Updated by Tomer Brisker about 4 years ago
- Related to Bug #31538: Each smart class parameter appears twice, when having two environments added
Actions