Frage

I have a search form in the header of my site, such as this:

=semantic_form_for :search, :url=>{:controller=>:listings,:action=>:search} do
...

This works fine except when the controller for the current page is scoped or namespaced -- not sure which. For example, '/users/sign_in' page is controlled by Devise and its controller is inside Devise namespace.

On that page, I get an error message that indicates that the action does not exist under Devise::Listings controller. (Of course it does not, because Listings controller is not in the Devise namespace.)

How do I make sure that url helper does not automatically prefix the namespace of the controller for the current page?

Keine korrekte Lösung

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top