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:
<a href="/member/profile/address/32/edit">Edit</a>
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...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---