Hi,
I am new to Ruby on Rails. I am trying to use 'check_box_tag' to
delete multiple tags(objects) at a time. I want to store checked tag_ids
into a hash. And I should be able to delete all checked tags by clicking
on 'Click Here' link. But it is not storing tag_ids into hash.
I have attached the image file. Please find it. And also help me.
Thanks
<%- @tags.each_with_index do |g, i| -%>
<% unless g.id.blank? %>
<tr <%= 'class="even_row"' if i.even? %>>
<td><%= check_box_tag 'tag_ids[]', g.tag_id %></td>
<td><%= g.tag.s_tag_id %></td>
<td><%= link_to( g.tag.s_uf_name, :controller =>
"refrigirators", :action => "edit_tag", :id => g.tag_id ) %></td>
<% if g.shelf_id.blank? %>
<td> <%= "(none)" %> </td>
<% else %>
<td> <%= g.shelf.shelf_name %> </td>
<% end %>
</tr>
<% end %>
<%- end -%>
Attachments:
http://www.ruby-forum.com/attachment/7060/checkboxtag.jpg
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.