DefaultFindBy
=====
(Yet another) solution to literal URLs and permalinks.
After I found myself redefining to_param on my models and changing
controllers load code, I had created this plugin.
You give it a name of the field. It takes that name, defines to_param
to return value of that field, and makes find use
find_by_that_field when it is given the string.
Example
===
- Post (id: integer, title: string, body: text)
default_find_by :title
end
Testing
===
To test this plugin, you’ll need rspec, rspec-rails and nakajima-acts_as_fu
gems installed.
Copyright © 2008 Artem Ignatiev, released under the MIT license