I think I'm loosing it here ... so I have a params hash, that I want to use in a controller:
Parameters: {"utf8"=>"✓", "_method"=>"patch", "authenticity_token"=>"etcetc", "scan"=> {"1"=>{"scan_id"=>"40", "organisation_id"=>"1", "select_scan"=>"false", "role"=>""}, "2"=>{"scan_id"=>"40", "organisation_id"=>"2", "select_scan"=>"false", "role"=>""}, "3"=>{"scan_id"=>"40", "organisation_id"=>"3", "select_scan"=>"false", "role"=>""}, "number"=>"222", "description"=>"nice!", "expert"=>"for dummies", "decentralisation"=>"0"}, "commit"=>"Update Scan", "id"=>"40"}
Now, if return to my view an instance variable, with value:
@q = params[:id]
that gives me '40', as expected.
@q = params['id']
also give me '40'
BUT, that's the only param value I can access? Every other value gives me nil, or an error like:
@q = params[:scan][:number] # => undefined method `[]' for nil:NilClass
@q = params['scan']['1'][:role] # => undefined method `[]' for nil:NilClass
@q = params[:scan].to_a # => []
@q = params[:scan].class # => NilClass
I've read about strong params, and all params are permitted, but still, no values are returned?