Forum: Ruby on Rails How: varibale as the parameter in params[]

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
80c1860bd22c8e295be401a6c6970396?d=identicon&s=25 Ichikawa Amin (ichikawa)
on 2007-05-08 08:50
hi guys,

In my rails rhtml page I have several check box named as param0,

in my controller method I want to obtain the value by a loop.
I have generated the name of the post values
by this code:
 while count< 10
 #@total << params[:param_me]
 @total << val_index

I want to store the values in the array: @total

In the comment line how can i place the param_me which will work as the
following line:

@total << params[:param0]
@total << params[:param1]
@total << params[:param9]

please take a hand in my code

This topic is locked and can not be replied to.