Browse the Ruby on Rails Community.

You are here: Browse Railsplugins Candidate Keys

Candidate Keys

= CandidateKeys

Alters find to include candidate keys of one’s own design. Useful when combined with to_param.

class Books < ActiveRecord::Base
  on_candidate_keys :find_by_isbn
  def to_param
    read_attribute :isbn
  end
end
Book.find("0977616630")

== Resources

Subversion

  • http://svn.tpope.net/rails/plugins/candidate_keys

NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly

Users


See all details


Membership

+ Join this railsplugin

Record Maintainer

'None'