On 8 June 2015 at 21:30, Cristiano de Araujo Bezerra
<[email protected]> wrote:
> ...
> this code (products/index) generates the error:
>
> <td><%= link_to Category.find(product.category_id).name, 
> category_path(product.category_id) %></td>

You have told us it generates an error, but not what the error is.
Please copy/paste the full text of the error here (from the server
window).

By the way, it would be better to use product.category rather than
Category.find(product.category_id).

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLvuhNf%3D%3D_P_B4WgLe%2BKKijTQ6agxrSFoks%2BgbjdwdZOsg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to