Skip to content

Commit

Permalink
Fix Genre
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhbhatia committed Oct 28, 2023
1 parent 6dba6ee commit c0953b0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion app/models/genre.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# updated_at :datetime not null
#
class Genre < ApplicationRecord
include Sluggable
validates :name, uniqueness: true
has_many :product_genres
has_many :products, through: :product_genres
Expand Down
2 changes: 1 addition & 1 deletion app/views/home/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<% cache @genres, expires_in: 60.seconds do %>
<% @genres.each do |genre| %>
<li class="p-6 border border-solid border-gray-300 rounded-xl mx-4 font-bold text-xl">
<%= link_to genre.name, genres_path(genre.name) %>
<%= link_to genre.name, genres_path(genre.slug) %>
</li>
<% end %>
<% end %>
Expand Down

0 comments on commit c0953b0

Please sign in to comment.