Domanda

We are creating an Rails 4 Engine to pull out some common functionality between our Rails apps. One thing that we are a bit confused is what if the Engine itself also has an Engine? Say, what if I wanted to put ActiveAdmin in it? Do we have to create a separate namespace just for the admin?

Also, what about the migrations for ActiveAdmin (and even Devise)? Should we put it in our Engine or do is it best practice to just say "before using this engine, make sure you have devise/active admin installed"?

È stato utile?

Soluzione

You should put all your engine dependencies (understand migrations, gems, lib, assets, ...) in ... well, your engine of course.

You can have devise mounted as an engine in your engine. It may require some special configuration though.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top