bug fix: was always requiring both mongoid & rails #43

Merged
merged 1 commit into from Feb 20, 2013

2 participants

@ronen

the defined? guards were checking string literals rather than constants, 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 constant ::Mongoid to be defined, which then broke other gems which likewise checked for the existence of that constant before doing mongo-specific things which failed because Mongoid wasn't really loaded)

@ronen ronen 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)
b7b5965
@nofxx nofxx merged commit 5692636 into nofxx:master Feb 20, 2013
@nofxx
Owner

Thanks man, my bad.

@ronen

no prob. thanks for the quick turnaround. (and for the handy gem!)

@ronen ronen deleted the unknown repository branch Feb 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment