Module Footnotes::Extensions::Exception
In: lib/rails-footnotes/backtracer.rb

Methods

Public Class methods

[Source]

# File lib/rails-footnotes/backtracer.rb, line 4
      def self.included(base)
        base.class_eval do
          alias_method_chain :clean_backtrace, :links
        end
      end

Public Instance methods

[Source]

# File lib/rails-footnotes/backtracer.rb, line 10
      def add_links_to_backtrace(lines)
        lines.collect do |line|
          expanded = line.gsub('#{RAILS_ROOT}', RAILS_ROOT)
          if match = expanded.match(/^(.+):(\d+):in/) || match = expanded.match(/^(.+):(\d+)\s*$/)
            file = File.expand_path(match[1])
            line_number = match[2]
            html = %[<a href="#{Footnotes::Filter.prefix(file, line_number, 1)}">#{line}</a>]
          else
            line
          end
        end
      end

[Source]

# File lib/rails-footnotes/backtracer.rb, line 23
      def clean_backtrace_with_links
        unless ::Footnotes::Filter.prefix.blank?
          add_links_to_backtrace(clean_backtrace_without_links)
        else
          clean_backtrace_without_links
        end
      end

[Validate]