Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mongoid.mongoid3? returns false positive when mongoid-observers gem installed in Mongoid 4 #26

Open
silentshade opened this issue Jun 24, 2014 · 1 comment

Comments

@silentshade
Copy link

When this gem is installed the

::Mongoid.const_defined? :Observer

returns

true

Why not to use Mongoid::VERSION instead?

  def self.mongoid3?
    ::Mongoid::VERSION.starts_with? '3'
  end
@skyeagle
Copy link
Owner

Yes, you are right. Could you provide a pull request for that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants