Hi all, I have a collection which I render via <%= render :partial => ''comment'', :collection => @results %> This works exactly as I expect it to. However, when I change it to <%= render :partial => @results %> or <%= render @results %> both of which the documentation describe as ''short hand'' versions of the first, I get: Missing template _comment.erb in view path in spite of the fact that the template is there and renders correctly in the first case. I''m using 2.3.8. Anybody know what is going on? Thanks for any help. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
joep
2010-Jul-27 12:39 UTC
Re: question regarding shorthand syntax for collection rendering
Never mind. It appears active scaffold is actually messing this up. In a newly created project without active scaffold it works just fine. On Jul 27, 7:11 am, joep <joe.archet...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi all, > > I have a collection which I render via > > <%= render :partial => ''comment'', :collection => @results %> > > This works exactly as I expect it to. > > However, when I change it to > > <%= render :partial => @results %> > > or > > <%= render @results %> > > both of which the documentation describe as ''short hand'' versions of > the first, I get: > > Missing template _comment.erb in view path > > in spite of the fact that the template is there and renders correctly > in the first case. > > I''m using 2.3.8. Anybody know what is going on? > > Thanks for any help.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.