What do you think is the best way to create SEO friendly URLs (dynamically) in Rails?
Override the to_param
method in your model classes so that the default numeric ID is replaced with a meaningful string. For example, this very question uses best-permalinking-for-rails in the URL.
Ryan Bates has a Railscast on this topic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With