Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7400057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:08:43+00:00 2026-05-29T04:08:43+00:00

I am working on a project where I am upgrading a Rails 2.3 application

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T04:08:44+00:00Added an answer on May 29, 2026 at 4:08 am

    free coding here but I guess this would do it for you

    resources :segments do
      collection do
        get 'listen' 
        post 'comment'
        post 'inside'
        post 'around'
        get 'suggest'
        get 'ipeds'
        get 'search_ipeds'
      end 
      member do
        get 'listen'
      end
      resources :photos 
      resources :school_statistics
      resources :comments
      resources :ad_spots
      resources :visits , :only => [ :index ] do 
        delete 'destroy_all', :on => :collection
      end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been refraining from upgrading Xcode until one specific project is out of
I am working on a project which involves uploading flash video files to a
While working a project tonight, I ended up using one .js resource file for
I am working a project that does not have a trunk / branches /
I am working on project in Linux which involves 1) Static Lib in C++
Currently I'm working on a project at work and we're looking at upgrading our
I am working with an ASP.NET MVC project which was originally started from the
I've just started working on an ASP.NET project which I hope to open source
I am upgrading a project I had working previously. This code worked a few
After upgrading a working project from EF 4.0 to 4.1, I am now receiving

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.