Forum: Ruby on Rails deep inspecting attributes

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F719c6cb34bd5b691c12b373b7244b4d?d=identicon&s=25 Dorian Mcfarland (Guest)
on 2006-01-25 21:14
(Received via mailing list)
Hi there,
in one of my templates I have the following code:

<% for film in @artist.films %>
<h3>films</h3>
<p><%= link_to film.title, :controller => 'films', :action =>
'showfilm', :animate_title => film.animate_title, :page => 'synopsis'
%></p>
<% end %>

however if I do:
<%= debug(@artist) %>
from the same template, then my array of films never appears.

Why is that, and is there a way I can make it appear?

thanks
dorian

--
I do things for love or money
--
+44 (0)7941 219 501
--
aim:oulalipo | yahoo:tachekent
F719c6cb34bd5b691c12b373b7244b4d?d=identicon&s=25 Dorian Mcfarland (Guest)
on 2006-01-25 21:23
(Received via mailing list)
I just answered that with:
<%= debug(@artist.films) %>

but I was wondering if there was a way to cascade through all
associations?

Dorian Mcfarland wrote:
> however if I do:
> <%= debug(@artist) %>
> from the same template, then my array of films never appears.
>
> Why is that, and is there a way I can make it appear?
>
> thanks
> dorian
>

--
I do things for love or money
--
+44 (0)7941 219 501
--
aim:oulalipo | yahoo:tachekent
This topic is locked and can not be replied to.