Project

General

Profile

« Previous | Next » 

Revision f71f5493

Added by Marek Hulán about 8 years ago

Fixes #14458 - use a base class for STI taxable objects

(cherry picked from commit d96297b17f55469e3c49c90979cbd004d80f461c)

View differences:

app/models/concerns/taxonomix.rb
# it can also be an empty array that means all taxonomies (user is not assigned to any)
def inner_select(taxonomy, inner_method = which_ancestry_method)
# always include ancestor_ids in inner select
conditions = { :taxable_type => self.name }
conditions = { :taxable_type => self.base_class.name }
if taxonomy.present?
taxonomy_ids = get_taxonomy_ids(taxonomy, inner_method)
conditions.merge!(:taxonomy_id => taxonomy_ids)

Also available in: Unified diff