Fetch check box id's into arry from one table to other table

11 views
Skip to first unread message

Piyush Chowhan

unread,
Mar 25, 2019, 7:37:41 AM3/25/19
to Ruby on Rails: Talk
Hi,


<td><%= f.check_box :tax_rates, :name => "tax_group[tax_rates][]", :value => tax_rate.id  %>

I want to fetch tax_rate.id to other table which is selected in the check box? 

The check box which is selected those id's I want to fetch in other table inside a parameter in array.

Multiple check box's are selected want those selected check box id's in to array in the other table of params

Walter Lee Davis

unread,
Mar 25, 2019, 9:20:48 AM3/25/19
to rubyonra...@googlegroups.com
Can you say a little more about your problem? It's not clear from the explanation above exactly what you're trying to do. Are you trying to get the values from the array of check boxes in a controller, and assign them to a different set of parameters?

Are you trying to do something in the page itself (maybe with JavaScript) to cause one set of check boxes to act on a different set of check boxes in the same page?

What do your parameters look like (in the development console) when you submit this form?

Walter

Reply all
Reply to author
Forward
0 new messages