D
dan.caugherty
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>
<% renderpartial => "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,
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.
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>
<% renderpartial => "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,
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.