From: dan.caugherty@... Date: 2006-09-01T11:20:31+09:00 Subject: Rails newbie: why is my partial template not rendering? 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, 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.