You are here: Browse Railsplugins 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
NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly