github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

norman / friendly_id

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 670
    • 50
  • Source
  • Commits
  • Network (50)
  • Issues (4)
  • Downloads (23)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (3)
    • edge
    • gh-pages
    • master ✓
  • Tags (23)
    • 2.3.1
    • 2.3.0
    • 2.2.7
    • 2.2.6
    • 2.2.5
    • 2.2.4
    • 2.2.3
    • 2.2.2
    • 2.2.1
    • 2.2.0
    • 2.1.4
    • 2.1.3
    • 2.1.2
    • 2.1.1
    • 2.1.0
    • 2.0.4
    • 2.0.3
    • 2.0.2
    • 2.0.1
    • 2.0.0
    • 1.9.9-beta
    • 1.0
    • 0.5
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

FriendlyId is the “Swiss Army bulldozer” of slugging and permalink plugins for ActiveRecord. It allows you to create pretty URL’s and work with human-friendly strings as if they were numeric ids for ActiveRecord models. — Read more

  cancel

http://norman.github.com/friendly_id

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Updated changelog. 
norman (author)
Tue Feb 09 15:57:34 -0800 2010
commit  802b92004d5345991636892bc03a5d1898e54b7f
tree    063ee538ec9d37c437e88f9dafbe44ef4b86f414
parent  ac049af160d1f39428154deb4e01f2c95b2b6641
friendly_id /
name age
history
message
file .gitignore Wed Jan 20 09:22:38 -0800 2010 Moved generated docs to "doc". [norman]
file Changelog.md Tue Feb 09 15:57:34 -0800 2010 Updated changelog. [norman]
file Contributors.md Thu Feb 04 12:09:29 -0800 2010 Updated history files. [norman]
file Gemfile Fri Jan 29 04:37:51 -0800 2010 Removed "contest" gem. [norman]
file Guide.md Thu Feb 04 08:38:04 -0800 2010 Tweaked version in benchmark. [norman]
file LICENSE Wed Jan 27 06:39:28 -0800 2010 Renamed History to Changelog. Updated copyright. [norman]
file README.md Tue Feb 09 15:49:11 -0800 2010 Fixed Guide link. [norman]
file Rakefile Thu Feb 04 11:59:37 -0800 2010 Added task to test plugin installation. [norman]
directory extras/ Thu Feb 04 11:59:37 -0800 2010 Added task to test plugin installation. [norman]
file friendly_id.gemspec Thu Feb 04 08:35:03 -0800 2010 Added AR dependency back to gem. [norman]
directory generators/ Mon Feb 01 11:12:33 -0800 2010 Made AR2 implementation completely separate fro... [norman]
directory lib/ Tue Feb 09 15:50:15 -0800 2010 Bumped version. [norman]
directory rails/ Thu Feb 04 08:36:03 -0800 2010 Required "friendly_id" in Rails init to stop ra... [norman]
directory test/ Thu Feb 04 08:35:47 -0800 2010 Moved tasks out of AR2 namespace. [norman]
README.md

FriendlyId

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:

http://example.com/states/washington

instead of:

http://example.com/states/4323454

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 {http://norman.github.com/friendly_id/file.Guide.html FriendlyId Guide}.

Rails Quickstart

gem install friendly_id

rails my_app

cd my_app

# add to config/environment.rb
config.gem "friendly_id", :version => ">= 2.3.0"

./script/generate friendly_id
./script/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
end

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

./script/server

GET http://0.0.0.0:3000/users/joe-schmoe

Docs, Info and Support

  • FriendlyId Guide
  • API Docs
  • Google Group
  • Source Code
  • Issue Tracker

Bugs:

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.

Credits:

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

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

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server