Project

General

Profile

« Previous | Next » 

Revision f9bae424

Added by Dominic Cleal about 8 years ago

fixes #13974 - remove nested arrays passed to AR finders

Passing a nested array to Active Record finder methods is deprecated in
Rails 4.2 and will be removed, they must be flattened first.

View differences:

app/models/concerns/taxonomix.rb
inner_ids ||= inner_ids_loc if inner_ids_loc
inner_ids ||= inner_ids_org if inner_ids_org
# In the case of users we want the taxonomy scope to get both the users of the taxonomy and admins.
inner_ids << admin_ids if inner_ids && self == User
inner_ids.concat(admin_ids) if inner_ids && self == User
inner_ids
end

Also available in: Unified diff