Search code examples
ruby-on-railsrubyseopermalinks

Best Permalinking for Rails


What do you think is the best way to create SEO friendly URLs (dynamically) in Rails?


Solution

  • 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.