README.markdown in acts_as_sluggable-0.0.2 vs README.markdown in acts_as_sluggable-0.0.3

- old
+ new

@@ -65,9 +65,28 @@ field :alternative_slug is optional. +## find + +To make things transparent and easy, by default, the find method of the acts_as_sluggable Documents will look for the object by the slug, not the id. + +So, if you had the Project class configured as the example above: + + @project = Project.create(:name => "Name") + + Project.find(@project.to_param) #=> @project + +If, for any reason, you have to look for the object using its id, you have to be explicit: + + @project = Project.create(:name => "Name") + + Project.find(:first, :conditions => {:_id => @project.id}) #=> @project + Project.where(:_id => @project.id) #=> @project + +The *find* behavior for the other Mongoid::Documents remains the same. + # About the Author [Crowd Interactive](http://www.crowdint.com) is an American web design and development company that happens to work in Colima, Mexico. We specialize in building and growing online retail stores. We don’t work with everyone – just companies we believe in. Call us today to see if there’s a fit. Find more info [here](http://www.crowdint.com)! \ No newline at end of file