Actions
Refactor #13974
closedRemove nested arrays from AR finder methods
Description
Rails 4.2 deprecates passing nested arrays to AR finders, e.g. Feature.find_by_name([['Puppet']])
should be flattened first.
This is triggered from two places in the codebase. One's in the SmartProxy.with_features call from require_smart_proxy_or_login (smart proxy auth concern) which passes an array into the scope causing nesting:
DEPRECATION WARNING: Passing a nested array to Active Record finder methods is deprecated and will be removed. Flatten your array before using it for 'IN' conditions. (called from block in <class:SmartProxy> at /home/dcleal/code/foreman/foreman/app/models/smart_proxy.rb:41)
The second is in Taxonomix:
DEPRECATION WARNING: Passing a nested array to Active Record finder methods is deprecated and will be removed. Flatten your array before using it for 'IN' conditions. (called from with_taxonomy_scope at /home/dcleal/code/foreman/foreman/app/models/concerns/taxonomix.rb:3
8)
Updated by The Foreman Bot almost 9 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3257 added
Updated by Dominic Cleal almost 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset f9bae42404170f723973bee401c5d1474cdad30b.
Updated by Dominic Cleal almost 9 years ago
- Translation missing: en.field_release set to 136
Actions