Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 5bce74d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/mongo_mapper/extensions/boolean.rb
Expand Up @@ -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.