Hiding partials when used with rjs.


I often find myself using partials in the following way when they are
intended for use with both javascript and html rendering:

-- page.html.erb
  render :partial => 'partial'

-- page.rjs
  page.replace 'element',
    :partial => 'partial', :locals => {:hidden => true}
  page.visual_effect :appear, 'element'

  hidden ||= nil
<div <%= 'style="display: none"' if hidden %>>

I was wondering whether anyone could suggest a better way of doing
this as I don't really like using the hidden ||= nil at the top of
every partial that is intended for this usage?

Thanks in advance,