<%=render :partial=>@styles %>
the partial html is :
_style.html.erb
and the object can be used in the partial erb is style
renders nothing.
You could use ruby-debug to break into the partial to check it is
getting there. Another thing to do is to check the html produced
(view source in browser) to check that it is in fact generating
nothing, rather than just nothing that displays.
Presumably you have checked that @styles is not empty?
Ya if I change it to the normal :collection style syntax it works fine.
Ah, I see, I had misunderstood the problem. Is @styles an array of
Style objects, and are you rendering from the style controller? Where
is _style.html.erb?
What version of Rails are you using? I don't know what version that
syntax appeared. Anyone?
Everything is in the styles views directory. rails 2.1.0. I am very confused as this sytnax is supposed to be supported by rails > 2.0. I even tried it in 2.3.2 and the same thing. I watched ryan bates railscasts about 4 times and I still do not know why it is not working.