Add this line to /config/routes.rb
map.connect 'products', :controller => 'catalogs', :action => 'list'
2. Retrieve url parameter: www.domain.com/products/34/d24s34/book
Add this line to /config/routes.rb
map.connect 'products/:id/:ref/:type', :controller => 'catalogs', :action => 'list'
catalogs_controller.rb
@id = params[:id]
@reference = params[:ref]
@type = params[:type]
No comments:
Post a Comment