filterrific
filterrific copied to clipboard
Using filterrific in a mountable engine
Hi together,
has anybody experience in setting up filterrific in a mountable engine?
Since I draw my route like this in my host application...
Rails.application.routes.draw do
mount MyEngine::Core::Engine => '', as: 'my_engine'
end
... the call of url_for
in my engines results always in an UrlGenerationError
. I can fix this by overriding every method which calls url_for
with MyEngine::Core::Engine.routes.url_for
. This is a really dirty workaround (since I have to duplicate all the method code). Any ideas/best practices/ways to do this better?