Named instances for Rails
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
.gitignore
Gemfile
Gemfile.lock
LICENSE
README.rdoc
Rakefile
named_instances.gemspec

README.rdoc

Named Instances

Provides support for named instances in Rails.

Quick usage:

class Diagnosis < ActiveRecord::Base
  has_named_instances :name
end

Diagnosis.create :name => "Diabetes Mellitus"

>> Diagnosis.get(:diabetes_mellitus)
=> #<Diagnosis id: 52, name: "Diabetes Mellitus", created_at: "2009-10-07 15:41:50", updated_at: "2009-10-07 15:41:50">

Patches welcome, enjoy!

Copyright

Copyright © 2009 - 2010 Jason Dew. See LICENSE for details.