find_by_param for permalinks
A nice, clear, declarative means of doing something I’ve been writing code to do for years … find_by_param
From the README:
Find_by_param helps you dealing with permalinks and finding objects by our permalink value
class Post < ActiveRecord:Base
make_permalink :with => :title
end
now you can do Post.find_by_param(…)
If you have a permalink-column find_by_param saves the permalink there and uses that otherwise it [...]





