I have a pretty simple comment system in my rails app - I would like to allow user to clic on commenters name to access his profile.
But without any success - I am not sure what I am missing.
<% @comments.each do |comment| %>
<p><a href="<%= user_path(@comment.user_id) %>" style="text-decoration : none"><%= image_tag comment.user.image, class: "img-circle", width: "30x30" if comment.user %><font class="small" color="#28c3ab"> @<%= comment.user.name if comment.user %></font></a>
<% end %>
But I have a no routes match error:
No route matches {:action=>"show", :controller=>"users", :id=>nil} missing required keys: [:id]
Any ideas what I am missing? I Know it's something easy but I'm out of ideas for now. Where should I add this call in my controllers?
I figured out that your problem might be the
@commentchange:
to: