Displaying 1 result from an estimated 1 matches for "user_description".
2006 Dec 17
12
Best practices for conditional display in views?
...inline item that should appear in a
<span>, or a list item that should appear in <li> tags.
That means that the enclosing tag (and, typically, CSS class reference)
need to be pulled back out into the view, like:
<li class="css_class">
<%= render :partial => "user_description" %>
</li>
But this will result in empty <p> or <span> or <li> tags being rendered
in the event that the conditional test (in the partial) returns false,
which happens frequently. So that suggests I should put the conditional
logic back in the view and remove it from...