Hello Adam,
replying to the list.
2005/10/25, Adam Groves <adam.groves@gmail.com>:> so I'd have a new route:
> map.connect ':controller/:project/:action'
>
> My edit action would then have to find the project like so:
>
> Project.find(:first, conditions => ['name = ?',
params[:project]])
>
> Does that make sense?
Yes it does, and is there any problem ? Because what you describe
above is exactly how it should be. I have personally used pretty URLs
like that to display categories in a products catalog, as well as the
product details:
/products/All+Categories/Holiday+Lights/Ropelight
map.catalog 'products/*category_path',
:controller => 'catalog', :action => 'list'
/products/details/J3902-021
map.product_details 'products/details/:product_no',
:controller => 'catalog', :action => 'details',
:product_no => /^[-\w]+$/
Hope that helps !
François
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails