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
This commit is contained in:
commit
1386013abd
2 changed files with 11 additions and 3 deletions
|
@ -6,6 +6,10 @@
|
|||
%ul.well-list
|
||||
- @query.application_backtrace.each do |location|
|
||||
%li
|
||||
%strong
|
||||
- if defined?(BetterErrors)
|
||||
= link_to(location.path, BetterErrors.editor[location.path, location.line])
|
||||
- else
|
||||
= location.path
|
||||
%small.light
|
||||
= t('sherlock.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
|
||||
|
|
Loading…
Reference in a new issue