app/controllers/miq_policy_controller/alert_profiles.rb
# Gather up the object ids based on the assignment selections
Gather up the object ids based on the assignment selections
Gather up the object ids based on the assignment selections
def alert_profile_get_assign_to_objects
    objs = []
    unless @assign[:new][:assign_to] == "enterprise"          
      if @assign[:new][:assign_to]                            
        if @assign[:new][:assign_to].ends_with?("-tags")
          if @assign[:new][:cat]                              
            objs = Classification.find(@assign[:new][:cat]).entries
          end
        else                                                  
          objs = @assign[:new][:assign_to].camelize.constantize.all
        end
      end
    end
    objs
  end
def alert_profile_get_assign_to_objects objs = [ ] unless @assign [ :new ] [ :assign_to ] == "enterprise" if @assign [ :new ] [ :assign_to ] if @assign [ :new ] [ :assign_to ] . ends_with? ( "-tags" ) if @assign [ :new ] [ :cat ] objs = Classification . find ( @assign [ :new ] [ :cat ] ) . entries end else objs = @assign [ :new ] [ :assign_to ] . camelize . constantize . all end end end objs end
Gather up the object ids based on the assignment selections
Gather up the object ids based on the assignment selections
# No further selection needed for enterprise # Assign to selected # Tag category selected # Model selected