Commit 1386013a authored by Robert Speicher's avatar Robert Speicher

Merge branch '18254-use-better_errors-editor-links-in-sherlock' into 'master'

Use better_errors editor links in sherlock

Closes #18254. Uses the same editor configuration of `better_errors`
so that you don't have to configure things twice. Remember to have a
custom initializer that specifies your editor.

Example for atom. File `config/initializers/better_errors.rb`:
````ruby
if defined?(BetterErrors)
  BetterErrors.editor = "atm://open?url=file://%{file}&line=%{line}"
end
````

See merge request !4497
parents 740a6ecb fbd2169f
......@@ -6,7 +6,11 @@
%ul.well-list
- @query.application_backtrace.each do |location|
%li
= location.path
%strong
- if defined?(BetterErrors)
= link_to(location.path, BetterErrors.editor[location.path, location.line])
- else
= location.path
%small.light
= t('sherlock.line')
= location.line
......
......@@ -11,13 +11,17 @@
= @query.duration.round(4)
= t('sherlock.milliseconds')
%li
- frame = @query.last_application_frame
%span.light
#{t('sherlock.origin')}:
%strong
= @query.last_application_frame.path
- if defined?(BetterErrors)
= link_to(frame.path, BetterErrors.editor[frame.path, frame.line])
- else
= frame.path
%small.light
= t('sherlock.line')
= @query.last_application_frame.line
= frame.line
.panel.panel-default
.panel-heading
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment