What i have:
Several references to the same partial but with different locals like
<%= render :partial => 'link/to/partial', :locals => {:fieldtype => 'textline', :text => object.text} %>
<%= render :partial => 'link/to/partial', :locals => {:fieldtype => 'list', :list => object.list, :header => 'HEADER'} %>
Now _partial.html.erb has the following line:
<%= render :partial => 'link/to/partial/'+fieldtype, :locals => locals %>
What i want:
Obviously :locals => locals does not work. How can i link all the locals to the next partial?
Just for clarification, you could put all the locals in a hash like this:
(Not that it can be confusing that
{}are both used for declaring a hash and a block)In your partial you would then do this: