url_for seems to have a bug when dealing with modules.
If in the module a/controller b directory
If I make the following call to url_for to link to another action in the
same controller passing the parameters through, an incorrect URL is
url_for(:action => “test”, :params => params)
The url generated by this code is:
The module name a got repeated. To get this to behave right, you need to
manually add :controller => nil to list of options to url_for.