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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:18:21+00:00 2026-05-26T02:18:21+00:00

The code below displays peferctly what i want to accomplish (show store name and

  • 0

The code below displays peferctly what i want to accomplish (show store name and item name).But when i subtitute @onedeal=@deal.find_with_ids(62) with @onedeal=@deal.find(params[:id]) i get an error Couldn't find Deal without an ID.What method should i use to fetch deal ID dynamically?The relationship between the Deal and store model is has many :through.

controller

  @deal=@city.deals
  @onedeal=@deal.find_with_ids(62)
  @store=@onedeal.stores.first(params[:store_id])

view

   <% @deal.each do |deal| %>
   <%=deal.item_name %>
   <%end%>
    <%=@store.store_name %>
  • 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-26T02:18:22+00:00Added an answer on May 26, 2026 at 2:18 am

    That error means that params[:id] is empty. Check your params hash to see what it contains, and verify that your action is getting the input it expects.

    You are absolutely using the .find method as intended, so I don’t think that’s the issue.

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

Sidebar

Related Questions

The code below displays either M or F in the GridView column after evaluating
The code below first displays folders as hyperlinks, you can click into these folders
In the code below, $row['site'] is an URL. In Chrome and IE8, it displays
I'm a EE newbie. I have the code below. the poll weblog displays at
I'm trying to display a date. Sample of my viewmodel code is below: [Display(Name
The code below displays a thumbnail of each image in a specific server directory
the code below displays at the matlab command panel perfectly well fprintf('%f\n%f\n%f\n',MDR,TER,FAR); each variable
Below is my code for my website. It works perfectly on firefox but not
The code below will show / hide a div on click. It works perfectly
I'm using the code provided below to display time and date. can anyone help

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.