Forward Partials to Partials? (Rails 2.3.x)
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} -%>
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?
精彩评论