-
Notifications
You must be signed in to change notification settings - Fork 210
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
Make activeadmin-mongoid play nice with ActiveRecord Resources #30
Conversation
@profmaad the changes to the resource file break the active-mongoid. With my application I can now only see active record resources in active admin, while mongoid resources fail. |
@kushkella Could you be a bit more specific? What is breaking for you? Any error messages? I am running a production system with this and both Mongoid and ActiveRecord resources work fine, as long as you add before_filter { @skip_sidebar = true } to your Mongoid-based resources. |
Thanks, i will try this. |
@profmaad I did a bunch of merges including some support for the sidebar can you try to rebase the changes on the On a side note this approach (keeping original functionality active) is something I like very much since the the™ path that can lead to a merge into active_admin itself. |
Paginator, fixes activeadmin#57
This reverts commit fffdcfb. Fixes activeadmin#54
[skip ci]
[skip ci]
Conflicts: lib/active_admin/mongoid/resource.rb
…tiveadmin resources
I finally upgraded to ActiveAdmin 0.6 and activeadmin-mongoid 0.3.0 today and got around to rebasing onto 0.3.0. The changes required to make it (seemingly) work with a mixed mongoid and activerecord setup were pretty small. |
Make activeadmin-mongoid play nice with ActiveRecord Resources
thanks! seems good for a 0.3.1 release :) |
I am developing a Rails application utilising both ActiveRecord and Mongoid.
I use ActiveAdmin and activeadmin-mongoid.
Since activeadmin-mongoid directly monkeypatches ActiveAdmin, it destroys functionality for ActiveRecord-based resources.
This patch first checks whether the resource is Mongoid-based, and if not just calls the original ActiveAdmin implementation.
It adds the necessity to add
to your mongoid-based resources.