diff --git a/app/helpers/comments_helper.rb b/app/helpers/comments_helper.rb index 13884237b..b9e69ddf9 100644 --- a/app/helpers/comments_helper.rb +++ b/app/helpers/comments_helper.rb @@ -20,6 +20,14 @@ module CommentsHelper end end + def commentable_path(comment) + if comment.commentable_type == "Budget::Investment" + budget_investment_path(comment.commentable.budget_id, comment.commentable) + else + comment.commentable + end + end + def user_level_class(comment) if comment.as_administrator? "is-admin" diff --git a/app/views/comments/show.html.erb b/app/views/comments/show.html.erb index e20790181..90e49a7d3 100644 --- a/app/views/comments/show.html.erb +++ b/app/views/comments/show.html.erb @@ -1,6 +1,6 @@