<commit_before>module SimplifiedBreadcrumbs

  class ActionController::Base

    protected

    def add_breadcrumb name, url = ''
      @breadcrumbs ||= []
      url = send(url) if url.is_a?(Symbol)
      @breadcrumbs << [name, url]
    end

    def self.add_breadcrumb name, url, options = {}
      before_filter options do |controller|
        controller.send(:add_breadcrumb, name, url)
      end
    end

  end

  module Helper

    def breadcrumb(separator = "&rsaquo;")
      @breadcrumbs.map { |txt, path| link_to_unless(path.blank?, h(txt), path) }.join(" #{separator} ")
    end

  end

end

ActionController::Base.send(:include, SimplifiedBreadcrumbs)
ActionView::Base.send(:include, SimplifiedBreadcrumbs::Helper)<commit_msg>Updated the view to only render links if they are not the current page<commit_after>module SimplifiedBreadcrumbs

  class ActionController::Base

    protected

    def add_breadcrumb name, url = ''
      @breadcrumbs ||= []
      url = send(url) if url.is_a?(Symbol)
      @breadcrumbs << [name, url]
    end

    def self.add_breadcrumb name, url, options = {}
      before_filter options do |controller|
        controller.send(:add_breadcrumb, name, url)
      end
    end

  end

  module Helper

    def breadcrumb(separator = "&rsaquo;")
      @breadcrumbs.map { |txt, path| link_to_unless((path.blank? || current_page?(path)), h(txt), path) }.join(" #{separator} ")
    end

  end

end

ActionController::Base.send(:include, SimplifiedBreadcrumbs)
ActionView::Base.send(:include, SimplifiedBreadcrumbs::Helper)
{'fraction_non_alphanumeric': 0.11776061776061776, 'fraction_numerical': 0.0, 'mean_word_length': 3.600591715976331, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1658441', 'n_tokens_mistral': 523, 'n_tokens_neox': 512, 'n_words': 119}