National characters to ascii letters for user-friendly URLs

Posted by Adam Hoscilo.

Simple way to have nice URLs:

  1. use this lib: http://snippets.dzone.com/user/Bragi
  2. in your Model add ‘to_param’ method that looks something like this:

example:

def to_param
  "#{self.id}-#{self.name.to_textual_id}"
end

I’ve made few changes to that lib. My version looks like this:

http://pastie.org/517065

User contributed notes

No Comments to display