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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:30:09+00:00 2026-06-15T12:30:09+00:00

I seem to be getting a little muddled here, so clarification more than anything

  • 0

I seem to be getting a little muddled here, so clarification more than anything needed here please.

I have a simple recipe app that enable users to upload recipes, and i have a section where all recipes with the category Dessert are listed

This class method (just a scope really) gives all recipes that have the category Dessert

def self.dessert_recipes
self.where(:category => "Desserts")

end

Within the controller I can then call this data to display in the view

@desserts = Recipe.dessert_recipes

And then in my view i can see the name of the recipe that has the category dessert

 <% @desserts.each do |r| %>
<p><%= link_to r.dish_name, recipe %></p>
  <p> <%= r.author %></p> # this doesnt exsist yet but it will
 <% end %>

What i want to do is click on the name of the recipe and it then take me to the show action for that particular recipe so that i can see the whole recipe from dish name to ingredients etc.

 <b><%= @recipe.dish_name %></b>
 <b><%= @recipe.catgegory %></b>

etc etc

The show action in the controller looks like this

 @recipe = Recipe.find(params[:id])

Im guessing that i cant access the whole of the recipe as im trying to access it within a different instance class? Some pointers on this would help so that i can get my head around what is happening

  • 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-15T12:30:13+00:00Added an answer on June 15, 2026 at 12:30 pm

    Thank you to MrTheWalrus for this answer

    link_to(r.dish_name, r)

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

Sidebar

Related Questions

I Have a display that needs to be a little more dynamic than what
I seem to have a problem with getting MVC to fill in my custom
This may seem like a simple question but i am getting an error when
I am getting a little confused and need some help please. Take these two
I can't seem to get this little AIR app I'm making to work right.
I have an Erlang application that is getting a little too resource-hungry to stay
I am a Powershell noob and seem to keep getting caught on little weird
I seem to be having a little trouble getting the route-me markers to hide.
I seem to be getting this particular always when i am trying to receive
I seem to be getting the above error when trying to make a callable

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.