Revision 2c4ee8ca
Added by Michael Moll about 4 years ago
app/services/tax_host.rb | ||
---|---|---|
|
||
# populate used_ids for 3 non-standard_id's
|
||
def user_ids
|
||
@user_ids ||= User.unscoped.except_admin.
|
||
@user_ids ||= User.unscoped.distinct.except_admin.
|
||
eager_load(:direct_hosts).where(:hosts => { :id => hosts.map(&:id) }).
|
||
pluck('DISTINCT users.id')
|
||
pluck(:id)
|
||
end
|
||
|
||
def provisioning_template_ids
|
Also available in: Unified diff
Fixes #29520 - use Arel where needed to wrap SQL