mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
Use Mongoid::Config#connect_to to congigure connection on Mongoid 5.0
This commit is contained in:
parent
3b4ce1e72d
commit
505b88f535
1 changed files with 3 additions and 1 deletions
|
@ -10,7 +10,9 @@ if RUBY_VERSION >= '1.9.2' && RUBY_VERSION < '2.2.0'
|
|||
end
|
||||
|
||||
Mongoid.configure do |config|
|
||||
if Mongoid::VERSION > '3.0.0'
|
||||
if Mongoid::VERSION >= '5.0.0'
|
||||
config.connect_to 'kaminari_test'
|
||||
elsif Mongoid::VERSION > '3.0.0'
|
||||
config.sessions = {:default => {:hosts => ['0.0.0.0:27017'], :database => 'kaminari_test'}}
|
||||
else
|
||||
config.master = Mongo::Connection.new.db('kaminari_test')
|
||||
|
|
Loading…
Reference in a new issue