ManageIQ/manageiq

View on GitHub
lib/acts_as_sti_leaf_class.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module ActsAsStiLeafClass
  extend ActiveSupport::Concern

  module ClassMethods
    def acts_as_sti_leaf_class?
      true
    end

    private def type_condition(table = arel_table)
      sti_column = table[inheritance_column]
      predicate_builder.build(sti_column, [sti_name])
    end
  end
end