RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Solutions for Slugs of All Sizes: acts_as_url + to_param

Rails loves convention over configuration. But sometimes we need to tweak those configurations, like using a slug in our parameters instead of an object’s primary key! Luckily, we don’t need to reinvent the wheel, because this problem has been solved in a variety of ways. This blog post looks at one of those solutions, the acts_as_url library, and how it overrides Rails’ to_param method.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in