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
Rails 5 mongoid 6 #105
Rails 5 mongoid 6 #105
Conversation
The previous version caused 3 query: 1. collection.empty? => load an item to ensure there are items in the collection 2. collection.first ... => again load an item to be sure about we querying mongo 3. collection.count(true) => actual count command
With this approach mongoid will fire only one count query
…ngoid into pencilcheck-patch-1 Conflicts: lib/active_admin/mongoid/helpers/collection.rb
…nto rails-5-mongoid-6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one nitpick, but overall I think it's 👍🏼
activeadmin-mongoid.gemspec
Outdated
gem.add_runtime_dependency 'mongoid', ['> 3.0', '< 5.0'] | ||
gem.add_runtime_dependency 'activeadmin', ['>= 1.0.0.pre', '< 2'] | ||
gem.add_runtime_dependency 'mongoid', ['>= 6.0', '< 6.1'] | ||
gem.add_runtime_dependency 'activeadmin', ['>= 1.0.0.pre5', '< 2'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@boie0025 what about just using ~> 1.0
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call
@boie0025 Are you going to merge? |
Yes, doing a bit more testing in our on this before we pull it into master. Will merge and release soon. |
Changes for Mongoid 6,update readme, pull in older fixes for misc bugs and green specs on rails 5.0.x and mongoid 6.0.x