auction_path(item.auction) on page 94
Reported by Scott | December 31st, 2007 @ 12:04 PM | in Second Edition
The ERb code example appears to contain an error:
<%= link_to ... auction_path(item.auction) %>
Shouldn't it be:
<%= link_to ... auction_path(item.id) %>
...or more simply:
<%= link_to ... auction_path(item) %>
Comments and changes to this ticket
-
Xavier Noria December 31st, 2007 @ 04:21 PM
I think the code in the book is actually right.
"auction_path" is a path generator that expects an auction. The intention of that snippet is to link items to the auctions they belong to. Also, the precending route definition and the next paragraph makes clear the example is about the auctions controller.
-
Obie January 3rd, 2008 @ 09:47 AM
- → State changed from new to invalid
The code in the books is correct.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
