This project is archived and is in readonly mode.

#5484 ✓invalid
siyang1982

undefined method `xxx_path'

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

"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

Comments and changes to this ticket

  • Marjan Krekoten'

    Marjan Krekoten' August 28th, 2010 @ 06:40 PM

    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.

  • Santiago Pastorino

    Santiago Pastorino August 28th, 2010 @ 06:52 PM

    • State changed from “new” to “invalid”
    • Importance changed from “” to “Low”

Create your profile

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

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages