Not sure if I worded that Subject line correctly…
Anyway, I want to be able to do something similar to the following
when processing form data:
1…5.each do |number|
if params[:data][number] == ‘1’ # <-- using block variable
“number” as a hash key does not seem to work…
The if statement is never evaluated as true, but at the same time no
errors pop up.
What is the proper means of doing the equivalent?