Skip to content

Commit

Permalink
Gemfile: bump Mongoid back down to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatack committed Dec 26, 2015
1 parent 9122527 commit 1511b35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions spec/support/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down Expand Up @@ -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'")
Expand Down

0 comments on commit 1511b35

Please sign in to comment.