From: Logan Capaldo Date: 2006-09-01T12:30:35+09:00 Subject: Re: Rails newbie: why is my partial template not rendering? On Aug 31, 2006, at 10:20 PM, dan.caugherty@gmail.com wrote: > Hi there, > > I wanted to be a good Rails programmer, and use a shared partial > template for > common view logic (in this case, displaying information about users). > > The view code that uses the render() call looks (something) like > this: > >

And now, the hat sizes of our users...

> <% render(:partial => "shared/user", :locals => { :user => @user }) > -%> > > ..and my app/views/shared/user.rthml file looks like: > >

<%=h user.name -%>

<%=h user.hat_size -%>

> > Now, the files are named and located where they should be as far as I > can tell, No they aren't ;) it has to be app/views/shared/_user.rhtml to be a partial. > but I never see my users' names or hat sizes rendered. Viewing the > HTML > source > of the resulting page shows.. nothing at all. Nothing is rendered, > maybe not even > whitespace! > > Any ideas as to what's going on? What am I missing? I'm stumped. > > Thx in advance, > -- Dan C. > >