Commit aeaab2bc8b7f055576662c5e66583249a185ac8e
1 parent
d6c24df3
Exists in
master
and in
1 other branch
simplify urls on problems/show view
Showing
1 changed file
with
6 additions
and
6 deletions
Show diff stats
app/views/problems/show.html.haml
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | - content_for :title, @problem.error_class || truncate(@problem.message, :length => 32) |
4 | 4 | - content_for :meta do |
5 | 5 | %strong App: |
6 | - = link_to @app.name, app_path(@app) | |
6 | + = link_to @app.name, @app | |
7 | 7 | %strong Where: |
8 | 8 | = @problem.where |
9 | 9 | %br |
... | ... | @@ -13,9 +13,9 @@ |
13 | 13 | = @problem.last_notice_at.to_s(:precise) |
14 | 14 | - content_for :action_bar do |
15 | 15 | - if @problem.unresolved? |
16 | - %span= link_to 'resolve', resolve_app_problem_path(@app, @problem), :method => :put, :data => { :confirm => problem_confirm }, :class => 'resolve' | |
16 | + %span= link_to 'resolve', [:resolve, @app, @problem], :method => :put, :data => { :confirm => problem_confirm }, :class => 'resolve' | |
17 | 17 | - if current_user.authentication_token |
18 | - %span= link_to 'iCal', app_problem_path(:app_id => @app.id, :id => @problem.id, :format => "ics", :auth_token => current_user.authentication_token), :class => "calendar_link" | |
18 | + %span= link_to 'iCal', polymorphic_path([@app, @problem], :format => "ics", :auth_token => current_user.authentication_token), :class => "calendar_link" | |
19 | 19 | %span>= link_to 'up', (request.env['HTTP_REFERER'] ? :back : app_problems_path(@app)), :class => 'up' |
20 | 20 | %br |
21 | 21 | = render "issue_tracker_links" |
... | ... | @@ -33,15 +33,15 @@ |
33 | 33 | = gravatar_tag comment.user.email, :s => 24 |
34 | 34 | %span.comment-info |
35 | 35 | = time_ago_in_words(comment.created_at, true) << " ago by " |
36 | - = link_to comment.user.email, user_path(comment.user) | |
36 | + = link_to comment.user.email, comment.user | |
37 | 37 | - else |
38 | 38 | %span.comment-info |
39 | 39 | = time_ago_in_words(comment.created_at, true) << " ago by [Unknown User]" |
40 | - %span.delete= link_to '✘'.html_safe, app_problem_comment_path(@app, @problem, comment), :method => :delete, :data => { :confirm => "Are sure you don't need this comment?" }, :class => "destroy-comment" | |
40 | + %span.delete= link_to '✘'.html_safe, [@app, @problem, comment], :method => :delete, :data => { :confirm => "Are sure you don't need this comment?" }, :class => "destroy-comment" | |
41 | 41 | %tr |
42 | 42 | %td= simple_format comment.body |
43 | 43 | - if @problem.comments_allowed? |
44 | - = form_for @comment, :url => app_problem_comments_path(@app, @problem) do |comment_form| | |
44 | + = form_for [@app, @problem, @comment] do |comment_form| | |
45 | 45 | %p Add a comment |
46 | 46 | = comment_form.text_area :body |
47 | 47 | = comment_form.submit "Save Comment" | ... | ... |