Sha256: 1911d31bd9f26ca65909026634cae07e39b8e6319afcab9891587912b3866b51

Contents?: true

Size: 315 Bytes

Versions: 12

Compression:

Stored size: 315 Bytes

Contents

# frozen_string_literal: true

module RailsMiniProfiler
  class RenderPartialTracePresenter < TracePresenter
    def label
      root = Rails.root.to_s.split('/').to_set
      identifier = model.identifier.split('/').to_set
      (root ^ identifier).drop(2).join('/').reverse.truncate(30).reverse
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rails_mini_profiler-0.7.0 app/presenters/rails_mini_profiler/render_partial_trace_presenter.rb
rails_mini_profiler-0.6.0 app/presenters/rails_mini_profiler/render_partial_trace_presenter.rb
rails_mini_profiler-0.5.0 app/presenters/rails_mini_profiler/render_partial_trace_presenter.rb
rails_mini_profiler-0 app/presenters/rails_mini_profiler/render_partial_trace_presenter.rb
rails_mini_profiler-0.4.0 app/presenters/rails_mini_profiler/render_partial_trace_presenter.rb
rails_mini_profiler-0.3.0 app/presenters/rails_mini_profiler/render_partial_trace_presenter.rb
rails_mini_profiler-0.2.1 app/presenters/rails_mini_profiler/render_partial_trace_presenter.rb
rails_mini_profiler-0.2.0 app/presenters/rails_mini_profiler/render_partial_trace_presenter.rb
rails_mini_profiler-0.1.3 app/presenters/rails_mini_profiler/render_partial_trace_presenter.rb
rails_mini_profiler-0.1.2 app/presenters/rails_mini_profiler/render_partial_trace_presenter.rb
rails_mini_profiler-0.1.1 app/presenters/rails_mini_profiler/render_partial_trace_presenter.rb
rails_mini_profiler-0.1.0 app/presenters/rails_mini_profiler/render_partial_trace_presenter.rb