Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

undefined method `xxx_path'

#5484

"undefined method series_new_path'"

_path don't work if the controller name belongs to some nouns(singular nouns == plural nouns):

el:
user => users => users_path (worked)
series => series => series_path (cann't work)

ENV:
ruby 1.9.2
rails 3.0.0_rc
WinXP

Reported by siyang1982 · August 28th, 2010 @ 06:22 PM

State: invalid
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Marjan Krekoten'
    Marjan Krekoten'

    resources :series

    rake routes | grep series

    series_index GET /series(.:format) {:action=>"index", :controller=>"series"}
    series_index POST /series(.:format) {:action=>"create", :controller=>"series"}
    new_series GET /series/new(.:format) {:action=>"new", :controller=>"series"} edit_series GET /series/:id/edit(.:format) {:action=>"edit", :controller=>"series"}

      series GET    /series/:id(.:format)      {:action=>"show", :controller=>"series"}
      series PUT    /series/:id(.:format)      {:action=>"update", :controller=>"series"}
      series DELETE /series/:id(.:format)      {:action=>"destroy", :controller=>"series"}
    

    So, you should use new_series_path and not series_new_path.

    August 28th, 2010 @ 06:40 PM

  2. Santiago Pastorino
    Santiago Pastorino
    • State changed from new to invalid
    • Importance changed from to Low

    August 28th, 2010 @ 06:52 PM