Permalink
Browse files

Ids can be BSON::ObjectId, Rails expects to_param to be a string.

  • Loading branch information...
1 parent 78b02d5 commit 2c8ca628170a72b632cbb1209b081718a7aa1e08 @obvio171 obvio171 committed Oct 13, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/mongomapper_ext/slugizer.rb
@@ -10,7 +10,7 @@ def self.included(klass)
end
def to_param
- self.slug.blank? ? self.id : self.slug
+ self.slug.blank? ? self.id.to_s : self.slug
end
protected

0 comments on commit 2c8ca62

Please sign in to comment.