filterrific icon indicating copy to clipboard operation
filterrific copied to clipboard

Using filterrific in a mountable engine

Open fsauter opened this issue 9 years ago • 0 comments

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?

fsauter avatar Aug 24 '15 09:08 fsauter