I have the following (abridged) routes in routes.rb:
map.namespace :member do |member|
member.resource :profile, :controller => ‘profile’ do |profile|
profile.edit_address ‘address/:id/edit’, :action =>
‘edit_address’, :conditions => { :method => :get }
end
end
which nicely creates (among others):
member_profile_edit_address GET /member/profile/address/:id/edit
{:action=>“edit_address”, :controller=>“member/profile/”}
Unfortunately, when I use this like so:
<%= link_to(‘Edit’, member_profile_edit_address(@member.address.id))
%>
which generates for example:
what happens upon clicking the link is:
NameError in Member/profile/Controller#edit_address
uninitialized constant Member::Profile
I assume that I have messed up the routes somehow, but it looks right
to me. Any help will be appreciated…