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 6253329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:58:26+00:00 2026-05-24T13:58:26+00:00

This may be a basic question, and I’m not even sure if it’s possible,

  • 0

This may be a basic question, and I’m not even sure if it’s possible, but here goes.

If I have a event model which is composed of events, and the URLs are /events to see all, and /events/:id to see an individual event… Can I also do something like /events/:status to redirect to the index controller and show say, previous, inactive events and so on based on what that status is, but also preserve the /events/:id functionality?

So basically:

/events/17 would bring me to the 17th event created and /events/previous would bring me to a listing of all events that have come and gone.

Is this possible? if so, how would I setup the routes?

I tried:

match "/events/:status" => "events#index"

resources :events

but that just overrides the :id one, so I can no longer get to an individual event. I’m still learning all of the terminology of rails, so my searching abilities are a little limited.

  • 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-24T13:58:27+00:00Added an answer on May 24, 2026 at 1:58 pm

    Try this:

    match "/events/previous" => "events#index", :defaults => { :status => 'previous' }
    

    This assumes your status is of limit number, so you could define them all each in online manually.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may seem like a very basic question but I did not seem to
May be this is the basic Question. But i am not able to understand
This may be a basic question, but I could not find an answer for
This may be a basic question but I'm not very proficient in SQL Server.
This may be a really basic SQL question, but I have seen a SQL
This may be a basic question, but I'm still looking for the answer. I've
This may be a basic question but I am pretty new to DDD. I
This may be a basic question but how can I include a module with
This may seem like a basic question, but I'm having trouble figuring out how
I'm new to Ruby, so this may be a pretty basic question. I have

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.