0

Imagine the following terminal commands

rails g resource HotDogs brand:string
rake db:migrate

This will create an endpoint

localhost:3000/hot_dogs/

I want it to be

localhost:3000/hot-dogs/

I would like to know how to do this manually without using a gem.

thedanotto
  • 6,895
  • 5
  • 45
  • 43

1 Answers1

1

Try adding a route like get '/hot-dogs => 'controller#action' That should work out.

Umang Raghuvanshi
  • 1,228
  • 15
  • 34