Browse files

bug fix: was always requiring both mongoid & rails

the defined? guards were checking string literals rather than symbols, so were always returning true.  

(for the case of Mongoid this meant that symbolize/mongoid was always being included, which as a side effect caused the symbol ::Mongoid to be defined, which then broke other gems which likewise checked for the existence of that symbol before doing mongo-specific things)
  • Loading branch information...
1 parent 4e45ce0 commit b7b59654c9cd532b89c33359dceefc30dc006129 @ronen ronen committed Feb 19, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/symbolize.rb
@@ -3,5 +3,5 @@ module Symbolize
autoload :ActiveRecord, 'symbolize/active_record'
-require 'symbolize/mongoid' if defined? 'Mongoid'
-require 'symbolize/railtie' if defined? 'Rails'
+require 'symbolize/mongoid' if defined? Mongoid
+require 'symbolize/railtie' if defined? Rails

0 comments on commit b7b5965

Please sign in to comment.