Belongs_to magic method "create_association!" seems to be broken

I’m trying to use magic method “create_{association}!” method added by the belongs_to macro.

I expect the generated association to be created, which it is… but the foreign_key on the parent record to be update to reflect the primary key of the newly generated record… but that’s not the case.

Please see this gist for what I’m working with: companies_controller.rb · GitHub

Is the members.company_id not supposed to be set by the create_company! method call?