I want my doorkeeper views to use the application layout:
https://github.com/applicake/doorkeeper/wiki/Customizing-views
This contains routes and helper methods from the main application.
For the routes, I can prefix main_app to the path but for the helper method I get the following error:
undefined method `is_active?' for #<ActionDispatch::Routing::RoutesProxy:0xade808c>
<li class="<%= main_app.is_active?("high_voltage/pages", "api") %>"><%= link_to t('developers'), page_path('api') %></li>
Why is this? The helper is in app/helpers/application_helper.rb
If you generated the views and they are placed in
app/views/doorkeeper/**then the engine still uses doorkeeper controllers.To fix this, you have to include your helper(s) into the engine’s
ApplicationController. Let’s say you have something like this:app/helpers/application_helper.rb
app/views/doorkeeper/applications/index.html.erb
This won’t work until you include your application helpers into doorkeeper controllers. So in
config/application.rb:this is similar configuration when you want to customize the layout.