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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:29:26+00:00 2026-05-28T17:29:26+00:00

I have a users_controller . I’ve created a portfolios_controller which I would like to

  • 0

I have a users_controller. I’ve created a portfolios_controller which I would like to act similarly to the users_controller; so GETing /portfolios/10 would actually pull the user with an id of 10. I’m not quite sure how to set up my routes for this. Here’s what I have right now in routes.rb:

get "portfolios/show"
resources :users

I got the following error when trying to access /portfolios/10: The action '10' could not be found for PortfoliosController.

Thoughts?

  • 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-28T17:29:27+00:00Added an answer on May 28, 2026 at 5:29 pm

    I would try a match statement with an :id parameter instead:

    match "/portfolio/:id" => "portfolios#show"
    

    Then you will have access to params[:id] in that action.

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

Sidebar

Related Questions

In my users_controller I have two methods signup_process and login . I would like
I have a friendships_controller but I would like to call its create and destroy
i have a usercenter/users_controller,in this controller have code like belows def login end def
My create user method in the users_controller.rb looks like: def process_login is_login_valid(params[:user][:user_name], params[:user][:password]) if
I have in a users_controller: @user = User.new(params[:user]) Passing parameters to a User model
I have a form which users must fill out and submit. The controller action
I have a controller user with a method login For some reason, when I
I have a core data application which uses a navigation controller to drill down
I have a controller action that checks this.User.Identity.IsAuthenticated What do you suggest how to
I have the following route: {language}/{controller}.mvc/{action}/{id} Once a user has choosen the language it

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.