Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
79 lines (49 sloc) 2.21 KB


FriendlyId is the "Swiss Army bulldozer" of slugging and permalink plugins for Ruby on Rails. It allows you to create pretty URL's and work with human-friendly strings as if they were numeric ids for ActiveRecord models.

Using FriendlyId, it's easy to make your application use URL's like:

instead of:

FriendlyId Features

FriendlyId offers many advanced features, including: slug history and versioning, scoped slugs, reserved words, custom slug generators, and excellent Unicode support. For complete information on using FriendlyId, please see the { FriendlyId Guide}.

FriendlyId is compatible with Rails 2.2.x - 3.0.

Rails Quickstart

gem install friendly_id

rails my_app

cd my_app

# add to Gemfile
gem "friendly_id", "~> 3.0"

rails generate friendly_id
rails generate scaffold user name:string cached_slug:string

rake db:migrate

# edit app/models/user.rb
class User < ActiveRecord::Base
  has_friendly_id :name, :use_slug => true

User.create! :name => "Joe Schmoe"



Docs, Info and Support


Please report them on the Github issue tracker for this project.

If you have a bug to report, please include the following information:

  • Stack trace and error message.
  • Version information for FriendlyId, Rails and Ruby.
  • Any snippets of relevant model, view or controller code that shows how your are using FriendlyId.

If you are able to, it helps even more if you can fork FriendlyId on Github, and add a test that reproduces the error you are experiencing.


FriendlyId was created by Norman Clarke, Adrian Mugnolo, and Emilio Tagua.

Copyright (c) 2008-2010, released under the MIT license.

Jump to Line
Something went wrong with that request. Please try again.