How to set values of nested parameters in Rails 4 from controller method?
问题 I have request model and nested model filled_cartridges when I create new request object i also need to set the values of nested params inside create controller method. I have many nested params so i need to iterate through them, something like that: params[:request][:filled_cartridges_attributes].each do |_,value| # here i try to set :client_id parameter, which is nested # where @client.id is defined value[:client_id] = @client.id # i am pretty sure that the problem is here # is it a correct