app/models/page.rb
# TROPHIC_WEB_DATA
# (not sure if this is the right place for this, but here it lives for now)
TROPHIC_WEB_DATA
(not sure if this is the right place for this, but here it lives for now)
TROPHIC_WEB_DATA ( not sure if this is the right place for this but here it lives for now )
def pred_prey_comp_data(breadcrumb_type)
    result = Rails.cache.fetch("pages/#{id}/pred_prey_json/#{I18n.locale}/5", expires: 1.day) do
      if !rank&.r_species? 
        { nodes: [], links: [] }
      else
        relationships = TraitBank::Stats.pred_prey_comp_for_page(self)
        handle_pred_prey_comp_relationships(relationships)
      end
    end
    result[:labelKey] = breadcrumb_type == BreadcrumbType.vernacular ? "shortName" : "canonicalName"
    result
  end
def pred_prey_comp_data ( breadcrumb_type ) result = Rails . cache . fetch ( "pages/#{id}/pred_prey_json/#{I18n.locale}/5" , expires : 1 . day ) do if ! rank &. r_species? { nodes : [ ] , links : [ ] } else relationships = TraitBank :: Stats . pred_prey_comp_for_page ( self ) handle_pred_prey_comp_relationships ( relationships ) end end result [ :labelKey ] = breadcrumb_type == BreadcrumbType . vernacular ? "shortName" : "canonicalName" result end
TROPHIC_WEB_DATA
(not sure if this is the right place for this, but here it lives for now)
TROPHIC_WEB_DATA ( not sure if this is the right place for this but here it lives for now )
# all nodes must be species, so bail
breadcrumb_type
<not_specific>