#95 ✓resolved
Łukasz Piestrzeniewicz

form_for fails with namespaced controllers

Reported by Łukasz Piestrzeniewicz | June 22nd, 2009 @ 09:21 AM

I'm trying to migrate Searchlogic 1.6.x app to 2.0.x. We use Searchlogic for both user and admin interface. The latter has a problem due to usage of namespaced controllers:

In routes.rb we have:

map.namespace :administration do |administration|

administration.resources :jobs, :collection => {:areas => :get, :majors => :get}

In administration/jobs/_search partial I want to submit job search to administration/jobs, using standard form_for (haml code):

  • form_for([:administration, @search], :id => 'search') do |f|

This fails with:

undefined method administration_searchlogic_search_path' for #<ActionView::Base:0x42c1484> (ActionView::TemplateError)

In my opinion it should rather use for administration_jobs_path - as it did in Searchlogic 1.6.x. View helper for form_for lacks tests and does some magic on the parameters so it's hard to pinpoint the problem.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Provides common named scopes and object based searching.

People watching this ticket

Pages