I am working on converting my standard Rails application into a mounted engine. The application is comparable to the standard application for blogs, and I want each model, controller and view to expand, so my choice is for the mounted engine.
One of the gems that I use is Devise, as I understand it, a bit of a mounted engine. It can be used inside the mounted engine, as indicated here .
I can use it partially in my engine. Everything works fine, including some Devise controllers I override, like this one:
# config/routes.rb Bbronline::Engine.routes.draw do devise_for :users, class_name: "Bbronline::User", module: :devise, controllers: { registrations: "bbronline/devise_overrides/registrations"} ...
The correct view of 'views / bbronline / devise_overrides / registrations / new_intermediair.html.haml' also loads correctly as expected.
However, my problem is that the views that I override without a custom controller are loaded incorrectly. For example, a view in which the login window is located in views/bbronline/devise/sessions/new.html.haml
and does not load. Instead, the standard login view is loaded, i.e. devise-2.1.0/app/views/devise/sessions/new.html.erb
Of course, I could solve this problem by redefining each controller with my own controller, as I did with the registration controller above, but it seems very ugly. Does every controller turn a way to do this? Is there a more convenient way to override views from a mounted kernel from another mounted kernel?