I downloaded the friendly_id gem in order to make my URLs more user friendly. To honor their instructions, I am asking this here instead of on GitHub.
Here is my Show Method
def show
@movie = Movie.friendly.find(params[:id])
end
This is in compliance with their documentation
Finders are no longer overridden by default. If you want to do friendly finds, you must
do Model.friendly.find rather than Model.find. You can however restore FriendlyId
4-style finders by using the :finders addon:
In my Model.rb file, I have the following
extend FriendlyId
friendly_id :title, use: :slugged
From their documentation
friendly_id :foo, use: :slugged # you must do MyClass.friendly.find('bar')
also from their documentation
def set_restaurant
@restaurant = Restaurant.friendly.find(params[:id])
end
For reference, here is their guide.
Granted, I haven't generated a migration yet, because I had already created the table.
I'm unsure of what my next step should be?
Thank you for your help.