[Radiant] map.resources and extensions
Mark Kirby
mark at fishladder.co.uk
Fri Mar 7 02:26:40 CST 2008
On 3 Mar 2008, at 09:19, Casper Fabricius wrote:
> Hi Mark,
>
> map.resources definitely works in extensions. Here is an example
> from one of my private extensions:
>
> define_routes do |map|
> map.reorder_materials '/admin/materials/reorder', :controller =>
> 'admin/materials', :action => 'reorder'
> map.resources :materials do |material|
> material.resources :branded_materials
> end
> map.resources :materials, :path_prefix => '/admin', :name_prefix
> => 'admin_', :controller => 'admin/materials'
> map.home '', :controller => 'materials', :action => 'index'
> map.admin '/admin', :controller => 'admin/materials', :action =>
> 'index'
> end
Thanks,
adding map.resources :projects, :path_prefix => '/admin', :controller
=> 'admin/projects' seems to have done the trick.
Mark
More information about the Radiant
mailing list