I think it's just a pluralization issue. The has_one
association on the User
should be singular (:business
) as should the method call in the controller (resource.business.build()
) and accepts_nested_attributes_for
.
That being said, that part of the controller should never even be getting hit. All of your logic should be contained within this first conditional. Everything happening here should probably be pulled out into another method and called after the successful save
. Here's a new gist with a refactoring of registrations_controller.rb
: https://gist.github.com/ccschmitz/7ea0a41180e25de9168d