I follow the Railscast Episode Pretty URLs with FriendlyId.
I'm on Rails4 and using the 5.0 stable branch on Friendly Id's Github Repo.
I followed the Tutorial:
My Model Clip.rb:
extend FriendlyId
friendly_id :title, use: :slugged
My Migration:
rails g migration AddSlugToClips slug:string
Edited the Migration:
class AddSlugToClips < ActiveRecord::Migration
def change
add_column :clips, :slug, :string
add_index :clips, :slug
end
end
With an empty Database i try to add a Clip and when i try to open it:
What am i missing?
If i directly access the Vine via
http://localhost:3000/clips/1
I get to the show page..