How to configure Active admin for mongoid and active recording?

I am developing a single application on rails that support mongodb CRUD and postgress CRUD, working with both databases.

Now I like to create an admin interface that communicates with both databases. Mongod and postgress.

I install below gem

gem "mongoid", "~> 4.0.0" gem 'bson_ext' gem 'activeadmin', github: 'gregbell/active_admin' gem 'ransack', github: 'activerecord-hackery/ransack' gem "activeadmin-mongoid", git: "git://github.com/elia/activeadmin-mongoid.git" 

I am setting up an active administrator as described below

http://activeadmin.info/docs/0-installation.html#initialize_active_admin

Now my active_admin works with the mongodb model, but does not work with the active_recode model

it gives me below error

I do not know what context to use for AdminUser

Please help me maintain both databases in active admin

+5
source share
1 answer

MongoDB is not officially supported by ActiveAdmin version 1.0.0.pre1. I expect someone to develop an adapter as soon as ActiveAdmin reaches 1.0.

0
source

Source: https://habr.com/ru/post/1208348/


All Articles