I think this is user error...
url_for([:admin, @site, @page]) ought to work...
Sujal
On Nov 8, 2007, at 2:03 PM, Brennan Dunn wrote:
>
> I''ve found that when using url_for with an array of objects,
> namespaces in your routes aren''t taken into consideration when
> determine the named route to use.
>
> For example, I could have my routes as:
>
> ---
> map.namespace :admin do |admin|
>
> admin.resources :sites, :has_many => [:pages]
>
> end
> ---
>
> Doing url_for([@site, @page]) is looking for site_page_path, rather
> than it''s actual named route, admin_site_page_path
>
> Has anyone else ran into this problem?
>
> Thanks,
> Brennan
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---