Hi,
I'm trying to create a model, named "form", which has_many "form_item" objects. The code is
@form = Form.new(:user_id => session[:user_id], :form_items => params[:form_items])
but I get an error, even though I thought I was passing in the expected form_item ...
ActiveRecord::AssociationTypeMismatch in FormsController#create
FormItem expected, got HashWithIndifferentAccess
Request
Parameters:
{"commit"=>"Submit Form", "form_items"=>[{"description"=>"bbb", "prescription_number"=>"111", "day_supply"=>"20"}]}
Thanks for any input, - Dave