Problems with passing :locals to a partial

I have:

<% @link_categories.each do |lc| %>

<%= link_to_function (image_tag “icons/bullet_add_green.png”, :align
=> “absmiddle”, :border => 0),
“show category” do |page|
page[:subcategory].toggle
page[:subcategory].replace_html
:partial => “new_subcategory”,
:locals => {:data => lc.data, :pid => lc.id }
end
%>

In the partial I have:

Neue Unterkategorie in “<%= data %>” erstellen:

<%= hidden_field “link_category”, “member_id”, :value => “2” %>
<%= hidden_field “link_category”, “parent_id”, :value => pid %>

“data” is properly insert into the partial, but “pid” won’t.

Any hints?

Thanx


Jochen

double check lc.id is working, try another var name [?]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs