0

Instead of using the full name of my partials (/controller/wherever/partial) I would like to put a dummy partial that forwards all of the locals variables to the real partial. Is there any way to access the locals variables from a partial (aside from the obvious, by name one-by-one)? That way I could do:

 <%=render :partial=>"controller/wherever/partial", :locals=>self_locals} -%>
Dan Rosenstark
  • 68,471
  • 58
  • 283
  • 421

1 Answers1

1

Try

:locals => local_assigns

Came across this today, wanted default value for a local

optional local variables in rails partial templates: how do I get out of the (defined? foo) mess?

Community
  • 1
  • 1
house9
  • 20,359
  • 8
  • 55
  • 61