Source

main / app / helpers / pages_helper.rb

Full commit
module PagesHelper
  def get_funder_link (funder, links_and_plans)
    link = links_and_plans.select { |x| x.funder_template_id == funder.id && x.question_id == -1 }.first
    link_to link.resource.desc, link.resource.url if link
  end

  def get_funder_plans (funder, links_and_plans)
    links_and_plans.select { |x| x.funder_template_id == funder.id && x.question_id == -2 }.map(&:resource)
  end
end