README.markdown in sluggable_finder-2.3.2 vs README.markdown in sluggable_finder-2.3.3

- old
+ new

@@ -1,7 +1,10 @@ ## sluggable_finder +NOTE: THIS GEM IS RAILS 2.X COMPATIBLE ONLY. +I have no intention to port it to 3.x, since this kind of thing is much easier in the newest ActiveRecord, anyway. + Ismael Celis http://github.com/ismasan/sluggable_finder This gem is originally based on http://github.com/smtlaissezfaire/acts_as_sluggable/tree/master/lib%2Facts_as_slugable.rb @@ -76,9 +79,17 @@ class Comment < SomeParentClass sluggable_finder :title, :ignore_sti => true end +You can pass an optional block to pre-process the slug before saving + + class Comment < SomeParentClass + sluggable_finder :title do |slug_candidate| + "comment-#{slug_candidate}" + end + end + ### Controllers You can do Model.find(slug) just how you would with a single numerical ID. It will also raise a RecordNotFound exception so you can handle that in your application controller. The idea is that you keep your controller actions clean and handle Not Found errors elsewhere. You can still use Model.find the regular way. \ No newline at end of file