I've created an RoR-App and I want to add a simple blog as engine that is already mountet to /blog where users can have their own blog. Now I didn't find anything how I can use the model user.rb in my blog engine.
In my main app I can use current_user.username
but in my engine I can't use it.
There are (at least) two ways to achieve this:
Inherit your controller class from the main application's
ApplicationController
:This way it will have access to all the same helpers that have already been configured there. As a downside, this might drag in unwanted functionality, too.
Manually include the Devise controller helpers: