Refactor #16527

Replace where_values calls on Rails scopes/relations

Added by Dominic Cleal 11 months ago. Updated 10 months ago.

Assigned To:Dominic Cleal
Target version:-
Difficulty: Bugzilla link:
Found in release: Pull request:
Story points-
Velocity based estimate-
Release1.14.0Release relationshipAuto


Rails 5 removes ( the where_values method that was present on relations, which is used in two places in Foreman:

72: conditions = value ? limited.where_values.join(' AND ') :' AND ')
200: refute_nil actual_scope.where_values.index{|condition| == 'field1'}

The replacement is either to use the public/documented where_values_hash method or to introspect where_clause (but that's 5.0+ only and again, rather a private API).

Associated revisions

Revision 1e7ae521
Added by Dominic Cleal 10 months ago

fixes #16527 - replace where_values calls on relations


#1 Updated by The Foreman Bot 11 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request added

#2 Updated by Dominic Cleal 10 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Dominic Cleal 10 months ago

  • Release set to 1.14.0

Also available in: Atom PDF