Logan Capaldo
9/1/2006 3:31:00 AM
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:
>
> <p>And now, the hat sizes of our users... </p>
> <% render(:partial => "shared/user", :locals => { :user => @user })
> -%>
>
> ..and my app/views/shared/user.rthml file looks like:
>
> <p><%=h user.name -%></p><p><%=h user.hat_size -%></p>
>
> 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.
>
>