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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:44:38+00:00 2026-06-16T06:44:38+00:00

I have the following in my view (index.html.erb) code: <% @projects.each do |project| %>

  • 0

I have the following in my view (index.html.erb) code:

<% @projects.each do |project| %>
   <%= link_to (@project) do %>
      <div id="tombstone">
         ...Some HTML here...
      </div>
   <% end %>
<% end %>

The goal is to have each project’s synopsis displayed inside the tombstone DIV and have the entire DIV act as the link to the project’s details page (show.html.erb).

My Controller has the following:

def show
   @project = Project.find(params[:id])
end

and the routes has the following:

resources :projects do
   ...
   resources :updates
end

The @project in the <%= link_to %> points back to the projects (index.html.erb) page, not to the project details page (show.html.erb) that the controller defines. I can only guess that the ID parameter isn’t getting passed, but I can’t figure out why.

  • 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-16T06:44:39+00:00Added an answer on June 16, 2026 at 6:44 am
    <%= link_to(project) do %> # not @project
    

    Technically you’ve been sent to index because @project probably new record. @project == Project.new, so link_to(Project.new) with GET request renders path to index action.

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

Sidebar

Related Questions

In my rails view(index.html.erb), i have following structure <div> <%= render :partial => create
I have the following view in app/views/posts/index.html.erb : <% @posts.each do |post| %> <%=
I have the following code in my index view. latest_entry_list = Entry.objects.filter(is_published=True).order_by('-date_published')[:10] for entry
I have the following HTML dropdown box on the index view of the Search
I have the following View code: @using (Html.BeginForm(Login, Press, FormMethod.Post)) { <fieldset> <legend>User Registration</legend>
I have the following layout: https://dustinhendricks.com/breastfest/index.html In ie7 ( or ie8 in Compatibility View
I have the following form in my /app/views/password_resets/new.html.erb view <% form_tag password_resets_path do %>
In my index.html I have the following template <script type=text/x-handlebars> {{#with ChatApp.messagesController}} {{view Ember.TextArea
I have the following code: index.html <HTML> <HEAD> <TITLE>My App</TITLE> <LINK rel=stylesheet type=text/css href=style.css>
In an MVC3 app, i have the following View: @using (Html.BeginForm(Index, Search, new {query

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.