corroded
corroded

Reputation: 21574

How to use a Rails engine in a rails engine

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"?

Upvotes: 2

Views: 184

Answers (1)

Pierre-Louis Gottfrois
Pierre-Louis Gottfrois

Reputation: 17631

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.

Upvotes: 1

Related Questions