app/models/run.rb
# STI type condition for STI model
# if the entity model is base of STI , no conditions added, 
#  that means the entity is constrained as an element of direct sum of all subcmodels of the base.
# CAUTION: for the moment, accepts only one level hierarchy of STI.
STI type condition for STI model
if the entity model is base of STI , no conditions added,
that means the entity is constrained as an element of direct sum of all subcmodels of the base.
CAUTION: for the moment, accepts only one level hierarchy of STI.
STI type condition for STI model if the entity model is base of STI no conditions added that means the entity is constrained as an element of direct sum of all subcmodels of the base . CAUTION : for the moment accepts only one level hierarchy of STI .
def sti_cond(entity)
      model_name = entity.model_name
      model = model_name.to_model
      if column?(model_name, inheritance_column) && model.base_class != model
        "#{entity.name}.#{inheritance_column} = '#{model_name}'" 
      else
        "TRUE"
      end
    end
def sti_cond ( entity ) model_name = entity . model_name model = model_name . to_model if column? ( model_name , inheritance_column ) && model . base_class != model "#{entity.name}.#{inheritance_column} = '#{model_name}'" else "TRUE" end end
STI type condition for STI model
if the entity model is base of STI , no conditions added,
that means the entity is constrained as an element of direct sum of all subcmodels of the base.
STI type condition for STI model if the entity model is base of STI no conditions added that means the entity is constrained as an element of direct sum of all subcmodels of the base .
# STI model except base model
entity
<not_specific>