Skip to content

Commit

Permalink
fix: use collection_nice_url_path for several paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitcheljager committed Jan 4, 2025
1 parent 2f40da9 commit 166ffe6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/views/collections/_collection_card.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="collection">
<div class="collection__image">
<% if collection.cover_image.attached? %>
<%= link_to collection_path(collection.nice_url), title: collection.title do %>
<%= link_to collection_nice_url_path(collection.nice_url), title: collection.title do %>
<% image_url = rails_public_blob_url(collection.cover_image.variant(quality: 95, resize_to_fill: [450, 250], format: :webp).processed) %>
<%= image_tag image_url,
srcset: "
Expand All @@ -17,7 +17,7 @@

<div class="collection__content">
<div class="collection__info">
<%= link_to collection.title, collection_path(collection.nice_url), class: "collection__title" %>
<%= link_to collection.title, collection_nice_url_path(collection.nice_url), class: "collection__title" %>
<%= link_to collection.user.clean_username, user_profile_path(collection.user), class: "collection__author" %> -
<small class="collection__count"><%= collection.posts.size %> codes</small>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/collections/_post_collection_posts.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
<% end %>

<center>
<%= link_to "View full collection", collection_path(@collection.nice_url), class: "button button--ghost #{@collection.posts.size > 6 ? "mt-1/4" : "mt-1/2" }" %>
<%= link_to "View full collection", collection_nice_url_path(@collection.nice_url), class: "button button--ghost #{@collection.posts.size > 6 ? "mt-1/4" : "mt-1/2" }" %>
</center>
</section>

0 comments on commit 166ffe6

Please sign in to comment.