Hi
I have problem with this part of routes.rb
map.namespace :admin do |admin|
admin.resources :segment_schemas, :except => :show
admin.resources :languages
admin.resources :projects do |project|
project.resources :blocks
project.resources :sections
project.resources :menus, :has_many => [:menu_items]
project.resource :language
project.resources :skin
end
admin.resources :clients, :has_many => [ :projects ]
admin.resources :skins
end
while using this template :
<% for menu in @menus %>
<tr>
<td><%=h menu.segment %></td>
<td><%=h menu.title %></td>
15. <td><%= link_to ''show'', [:admin,@project,menu]
%></td>
16. <td><%= link_to ''edit'',
edit_admin_project_menu_path(menu) %></
td>
17. <td><%= link_to ''delete'', menu, :confirm =>
''Are you
sure?'', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to ''New menu'',
new_admin_project_menu_path(@project) %>[/
code]
it throws out :
Showing app/views/admin/menus/index.html.erb where line #16 raised:
edit_admin_project_menu_url failed to generate from
{:controller=>"admin/menus", :action=>"edit",
:project_id=>1},
expected: {:controller=>"admin/menus",
:action=>"edit"}, diff:
{:project_id=>1}
I tried to define various parameters for routes but it just don''t
work :/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---