I am working on a project where I am upgrading a Rails 2.3 application to Rails 3.1. There is one thing which I am not able to figure out. Below is a route defined in a Rails 2.3 application:
map.resources :segments, :collection => { :listen => :get, :comment => :post, :inside => :post, :around => :post , :suggest => :get, :ipeds => :get, :search_ipeds => :get }, :member => { :listen => :get }, :has_many => [ :photos , :school_statistics, :comments, :ad_spots ] do |segments|
segments.resources :visits , :only => [ :index ], :collection => { :destroy_all => :delete }
end
I am not sure how to write this route using Rails 3.1 to perform the same functionality which this route is performing using Rails 2.3. I searched online to find some resources which explains this and also I read the routes documentation on the Ruby on Rails website but I still can't get it.