cirandas.net

ref: master

config/routes/profile/23_profile.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
Noosfero::Application.routes.draw do

  ##
  # Keep products URL compatibility
  get 'catalog(/:profile)', to: redirect{ |params, request| "/profile/#{request.params[:profile]}/plugin/products/catalog" }
  get 'profile(/:profile)/catalog', to: redirect{ |params, request| "/profile/#{request.params[:profile]}/plugin/products/catalog" }
  get 'myprofile(/:profile)/manage_products(/:action(/:id))', to: (redirect do |params, request|
    "/profile/#{request.params[:profile]}/plugin/products/page/#{request.params[:action]}/#{request.params[:id]}"
  end)

end