Skip to content

Commit

Permalink
fix: ci fail due to user_path helper method doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Waishnav committed Aug 14, 2024
1 parent 3658dd5 commit 35bc457
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/simple_discussion/forum_posts/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
.where(forum_threads: { id: @forum_thread.id })
.distinct %>
<% users.each do |user| %>
<button class="dropdown-item" type="button" data-name="<%= user.name %>" data-profile-link="<%= user_path(user) %>">
<button class="dropdown-item" type="button" data-name="<%= user.name %>" data-profile-link="<%= user_profile_link(user) %>">
<%# image_tag user.profile_picture, class: "rounded-circle", style: "width: 20px; height: 20px" %>
<img class="rounded-circle mr-1" src="<%= gravatar_url_for(@forum_post.user.email, size: 24) %>" alt="avatar of user">
<%= user.name %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<td>
<div class="d-flex flex-row justify-content-between align-items-center p-2">
<%= link_to spam_report.user.name, user_path(spam_report.user), class: "btn btn-outline-primary", title: t('user_profile') %>
<%= link_to spam_report.user.name, user_profile_link(spam_report.user), class: "btn btn-outline-primary", title: t('user_profile') %>
</div>
</td>
<td>
Expand Down
4 changes: 4 additions & 0 deletions test/dummy/app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
module ApplicationHelper
def eser_profile_link(user)
"/users/#{user.id}"
end

end

0 comments on commit 35bc457

Please sign in to comment.