I\'ve come across a few SO questions on this topic, but all seem out of date or simply bad coding practice.
Problem: I am signing up a user as part of a checkout flow. I
In your application_controller.rb
class ApplicationController < ActionController::Base
before_action :configure_strong_params, if: :devise_controller?
def configure_strong_params
devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:username, :name,
:addresses_attributes => [:address, :address2, :city, :state_id, :zip_code]) }
end
end
Now in your registration form you can use address_attributes & devise signup params will accept this.
Now to rescue from the filter chain halted, please try this in your registrations_controller.rb file
class RegistrationsController < Devise::RegistrationsController
skip_before_filter :require_no_authentication, only: :create
#other codes
end