partial with dynamic locals

I would like to use a partial with dynamic locals. But I cant seem to
figure out how to do it.
this works with 1 local but not multiple.

partial_name = "shared/simple_partial_with_locals"
local_hash = {:local1 => "local 1 value"}

render :partial => partial_name, :locals =>{ local_hash }

any ideas on how I could accomplish this?

Small refactor of content_tag_for, makes it work in helper_methods, and dries it out a bit.

Looking for comments.

http://rails.lighthouseapp.com/projects/8994/tickets/871

Thanks in advance,
  Tom