Fix when assigning nested attributes raises "undefined method `to_sym' for nil:NilClass"
You might have a table without a primary key set in MySQL.
You can fix this by adding a primary key index to the guilty MySQL table, or by setting self.primary_key = "id"
in your class definition.
Related, but different issue: Rails 2 does not find an association when it is named with a string instead of a symbol