You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can be an issue when we are in a structure where there is a couple of nesting controllers like:
ApplicationController
Admin::BaseController < ApplicationController
Admin::OrdersController < Admin::BaseController
With a views folder like
...
app/views/admin/base/show.pdf.erb
app/views/admin/base/show.html.erb
The controller use the lookup_context to fetch the correct show view thanks to the self.local_prefixes.
Let's for example try to render the show action in html format. The lookup context try to load the first available view traversing:
app/views/admin/orders
app/views/admin/base
app/views/application
This should be the same as for the pdf format request but it seems not. To solve this we can directly use lookup_context
The text was updated successfully, but these errors were encountered:
Currently the template for render view by controller is made by fetching directly the virtual path like
controller/action
wicked_pdf/lib/wicked_pdf/pdf_helper.rb
Line 81 in b116c43
This can be an issue when we are in a structure where there is a couple of nesting controllers like:
ApplicationController
Admin::BaseController < ApplicationController
Admin::OrdersController < Admin::BaseController
With a views folder like
app/views/admin/base/show.pdf.erb
app/views/admin/base/show.html.erb
The controller use the
lookup_context
to fetch the correctshow
view thanks to theself.local_prefixes
.Let's for example try to render the show action in html format. The lookup context try to load the first available view traversing:
app/views/admin/orders
app/views/admin/base
app/views/application
This should be the same as for the pdf format request but it seems not. To solve this we can directly use
lookup_context
The text was updated successfully, but these errors were encountered: