app/models/offerings/offering_dashboard_item.rb
# Evaluates the criteria for this item using the passed object. Object can be any type of object, potentially. If the object
# is an ApplicationForOffering or responds to an :app method, then we also evaluate the other criteria for this dashboard item.
# Returns true if this dashboard item should be shown for this object.
Evaluates the criteria for this item using the passed object. Object can be any type of object, potentially. If the object
is an ApplicationForOffering or responds to an :app method, then we also evaluate the other criteria for this dashboard item.
Returns true if this dashboard item should be shown for this object.
Evaluates the criteria for this item using the passed object . Object can be any type of object potentially . If the object is an ApplicationForOffering or responds to an : app method then we also evaluate the other criteria for this dashboard item . Returns true if this dashboard item should be shown for this object .
def show_for?(object)
    return false if disabled?
    if object.respond_to?(:app)
      if offering_status
        application_status_type_name = offering_status.application_status_type.name
        return false unless object.app.send(status_lookup_method, application_status_type_name)
      end
      if offering_application_type
        return false unless object.app.application_type == offering_application_type
      end
    end
    return true if criteria.blank?
    (eval(criteria.to_s) rescue false) ? true : false
  end
def show_for? ( object ) return false if disabled? if object . respond_to? ( :app ) if offering_status application_status_type_name = offering_status . application_status_type . name return false unless object . app . send ( status_lookup_method , application_status_type_name ) end if offering_application_type return false unless object . app . application_type == offering_application_type end end return true if criteria . blank? ( eval ( criteria . to_s ) rescue false ) ? true : false end
Evaluates the criteria for this item using the passed object.
Evaluates the criteria for this item using the passed object .
object