Commit 06355efe31e58a7007f696307ce84ee74965eaf9
1 parent
f85a8a16
Exists in
master
and in
1 other branch
Fixed broken #link_to_github.
Showing
2 changed files
with
5 additions
and
5 deletions
Show diff stats
app/helpers/errs_helper.rb
... | ... | @@ -8,10 +8,10 @@ module ErrsHelper |
8 | 8 | Errbit::Config.confirm_resolve_err === false ? nil : 'Seriously?' |
9 | 9 | end |
10 | 10 | |
11 | - def link_to_github app, notice, text=nil | |
12 | - file_name = notice.top_in_app_backtrace_line['file'].split('/').last | |
13 | - file_path = notice.top_in_app_backtrace_line['file'].gsub('[PROJECT_ROOT]', '') | |
14 | - line_number = notice.top_in_app_backtrace_line['number'] | |
11 | + def link_to_github app, line, text=nil | |
12 | + file_name = line['file'].split('/').last | |
13 | + file_path = line['file'].gsub('[PROJECT_ROOT]', '') | |
14 | + line_number = line['number'] | |
15 | 15 | link_to(text || file_name, "#{app.github_url_to_file(file_path)}#L#{line_number}", :target => '_blank') |
16 | 16 | end |
17 | 17 | ... | ... |
app/views/notices/_backtrace.html.haml
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | %th |
5 | 5 | %ul.line-numbers |
6 | 6 | - lines.each do |line| |
7 | - %li= (@app.github_url? && Notice.in_app_backtrace_line?(line)) ? link_to_github(@app, @notice, line['number']) : line['number'] | |
7 | + %li= (@app.github_url? && Notice.in_app_backtrace_line?(line)) ? link_to_github(@app, line, line['number']) : line['number'] | |
8 | 8 | |
9 | 9 | %td |
10 | 10 | %ul.lines | ... | ... |