I am trying to build a simple app using Ruby on Rails. Essentially, I have a route that maps to a controller, whose view looks like this:
<div class="wishlist-container">
<% @wishlists.each do |w| %>
<div class="wishlist-card">
<h4><%= w.title %></h4>
<%= link_to "View List", wishlist_path(w) %>
</div>
<% end %>
Everything works correctly except for the link. For whatever reason, the link links to "." instead of "/" where <id>
is the id. For example, it should link to /wishlist/1
but instead goes to /wishlist.1
.
What is happening? How can I solve this problem?