views:

808

answers:

1

I have the following route definied:

map.resources :addresses, :path_prefix => ':site', :name_prefix => 's_'

I've had no problem correcting my scaffolding links for "Show" and "New". But I am getting a failure to generate error when attempting to use:

edit_s_address_path(address) or edit_s_address

rake routes shows that this is the proper path. I'm perplexed. Thanks in advance.

A: 

Shouldn't you use s_edit_address_path(address)? According to the Rails Guide on routing, the name_prefix comes at the start of the route name.

John Topley
That's what I thought, too. But I get an undefined method name using the name prefix at the beginning. rake routes shows that 'edit' and 'new' prefix everything.