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

  • Home
  • SEARCH
  • 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 9113575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T03:59:51+00:00 2026-06-17T03:59:51+00:00

I have a nested resource: resources :users do resources :cust_uploads end After uploads are

  • 0

I have a nested resource:

  resources :users do
    resources :cust_uploads
  end

After uploads are made, I can view a list of them under the users index page:

  <% @user.cust_uploads.each do |up| %>
     <li><%= up.name %></li>
  <% end %>

But when I go to: /users/3/cust_uploads/1 I get a record not found error: Couldn’t find CustUpload with id=1. Am I not saving to DB properly?

Any idea whats happening or how I can diagnose?

schema has no ID columns but I thought that was automatic?

ActiveRecord::Schema.define(:version => 20130109001001) do

  create_table "cust_uploads", :force => true do |t|
    t.string   "name"
    t.string   "cust_file_url"
    t.datetime "created_at",    :null => false
    t.datetime "updated_at",    :null => false
    t.integer  "user_id"
  end

  create_table "users", :force => true do |t|
    t.string   "email"
    t.string   "password_digest"
    t.datetime "created_at",      :null => false
    t.datetime "updated_at",      :null => false
  end

end
  • 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-06-17T03:59:53+00:00Added an answer on June 17, 2026 at 3:59 am

    Maybe 1 is not the ID of the created model. Try printing them like this and then click on a model:

    <% @user.cust_uploads.each do |up| %>
       <li><%= link_to up.name, up %></li>
    <% end %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have a nested resource like so: resources :users resources :posts end and
I have a resource nested in another: resource :users do resource :posts end The
I have a nested resource in my routes.rb like this: map.resources :users, :only =>
I have a nested resource that looks like this: resources :events resources :attendances post
I have 2 resources, one being a nested resource of another: parent_resource and child_resource
Okay, I have the following create action #posts_controller, nested resource under discussions def create
I have a set of nested resources -- :users and :messages. resources :users, :only
I have three resources - users , lists and items . I just nested
Users have many websites, and Websites have many Keywords. (Keywords being nested resources of
I have a nested model structure that looks like this: resources :users, :path =>

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.