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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:25:37+00:00 2026-05-27T23:25:37+00:00

I am working on a Ruby on Rails app which which has the following

  • 0

I am working on a Ruby on Rails app which which has the following path to view a user’s page

/pics/user/:id

:id being the generated id attribute. My question is that is the proper way for the the app to deal with a number that is not a user id in the place of :id.

The methods I was considering are; creating an Error page and redirect to it or redirecting to another page (in this case a page with the list of all the users) and generating an error message. Are either of these ideas correct, or should I do something else entirely?
My goal is to adhere to proper ruby on rails and web conventions as closely as possible.

Thanks!

  • 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-27T23:25:38+00:00Added an answer on May 27, 2026 at 11:25 pm

    Usually you will be doing Model.find(params[:id]) and that will raise ActiveRecord::RecordNotFound that is to make the web server send a 404 Not Found response.

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

Sidebar

Related Questions

I'm working on a ruby on rails app which connects to Jira through jira
I'm working on a simple Rails app, which currently has four pages - Home,
We're working on a Ruby on Rails app that needs to take advantage of
Is it feasible to have a Ruby on Rails app, which is: a) deployed
I have a Ruby on Rails app that I'm working on and I'm having
I'm working on an Rails app which reads a CSV file on the server.
I'm working on a Ruby on Rails/PostgreSQL web app that a mobile device communicates
I used to have the following call working just fine on a Rails app
I'm working on upgrading a Rails 2.3.11, Ruby 1.9.2 app to Rails 3.0.10, and
I'm writing a Ruby on Rails app. The following jQuery code is included in

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.