RoR nested attributes produces duplicates when edit
问题 I'm trying to follow Ryan Bates RailsCast #196: Nested model form part 1. There're two apparent differences to Ryans version: 1) I'm using built-in scaffolding and not nifty as he's using, and 2) I'm running rails 4 (I don't really know what version Ryans using in his cast, but it's not 4). So here's what I did rails new survey2 cd survey2 bundle install rails generate scaffold survey name:string rake db:migrate rails generate model question survey_id:integer content:text rake db:migrate Then