Assuming User has_one :subscription, Subscription belongs_to :user, and I am using accepts_nested_attributes_for to nest subscription attributes into the user creation form, what is the best way to locate and update and existing subscription (if it exists) based on User.email == Subscription.email?
Note that existing subscriptions could have user_id = nil
Probably what you want to do is use the email as the foreign key: