The above works fine when I submit and save the data. However, when I later try to retrieve and edit the data, I have problems.
Specifically, when I try to pass the 'edit' form an instance variable containing the questionnaire hash: @questionnaire = {:field_name => "Y"}I get an error message like this: undefined method `field_name' for {"field_name"=>"Y"}:HashWithIndifferentAccess
The form_for helpers don't work with a hash: they expect the thing
they are editing to have accessor methods for the attributes you are
editing.
Fred