From 1511b354bdf273613eb8b501ffdd59c23a70d027 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Sat, 26 Dec 2015 08:10:24 +0100 Subject: [PATCH] Gemfile: bump Mongoid back down to v4 --- Gemfile | 2 +- spec/support/schema.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 3d60024bc..260cb7ac8 100644 --- a/Gemfile +++ b/Gemfile @@ -43,7 +43,7 @@ else end if ENV['DB'] =~ /mongodb/ - gem 'mongoid', '~> 5.0.0', require: false + gem 'mongoid', '~> 4.0.0', require: false end # Removed from Ruby 2.2 but needed for testing Rails 3.x. diff --git a/spec/support/schema.rb b/spec/support/schema.rb index d46b6cec9..f5c46a66f 100644 --- a/spec/support/schema.rb +++ b/spec/support/schema.rb @@ -25,7 +25,7 @@ end class Person < ActiveRecord::Base - if ActiveRecord::VERSION::MAJOR == 3 + if ::ActiveRecord::VERSION::MAJOR == 3 default_scope order('id DESC') else default_scope { order(id: :desc) } @@ -125,7 +125,7 @@ class Article < ActiveRecord::Base alias_attribute :content, :body - if ActiveRecord::VERSION::STRING >= '3.1' + if ::ActiveRecord::VERSION::STRING >= '3.1' default_scope { where("'default_scope' = 'default_scope'") } else # Rails 3.0 does not accept a block default_scope where("'default_scope' = 'default_scope'")