Permalink
Browse files

Prevent against another gem defining Boolean first as a Module and not a

Class preventing MongoMapper from loading.
  • Loading branch information...
cmeiklejohn committed Apr 23, 2011
1 parent 867f1cf commit 5bce74d4c1303ec27528a5f118e5524c81adc691
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/mongo_mapper/extensions/boolean.rb
@@ -39,6 +39,10 @@ def from_mongo(value)
end
end
class Boolean
unless defined?(::Boolean)
class ::Boolean; end
end
::Boolean.module_eval do
extend MongoMapper::Extensions::Boolean
end
end

0 comments on commit 5bce74d

Please sign in to comment.