Skip to content
/ route_by Public

Rails Plugin that enables RESTful Resources to be routed by a field other than the record id.

License

Notifications You must be signed in to change notification settings

gnoso/route_by

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

route_by

Route_By allows you to use a field other than ID for identifying object identities in your routes.

Install

To install, simply run the following command from your project:

script/plugin install https://github.com/gnoso/route_by.git

Usage

In your ActiveRecord model classes, simply add the route_by declaration:

class Car < ActiveRecord::Base
  route_by :name
end

As a result of this statement, assuming your class object (Car in this instance) has an ID of 114 and a :name attribute with the value "eleanor", the ID of the record is now eleanor instead of 114.

About

Rails Plugin that enables RESTful Resources to be routed by a field other than the record id.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages