AJAX Devise Form with Rails not Updating Data AJAX Devise Form with Rails not Updating Data ajax ajax

AJAX Devise Form with Rails not Updating Data


I ended up putting an update method in my users_controller (as opposed to my registrations_controller):

  def update    @user = User.find(params[:id])    @user.update(account_update_params)  end  def account_update_params    params.require(:user).permit(:first_name, :last_name, :email, :password, :password_confirmation, :current_password, :phone, :admin, :stripe_customer_id, :street_address_1, :street_address_2, :city, :state, :zip, :provence, :country, :has_shipping)  end

Adding the appropriate route, and changing the simple_form_for line to:

d<%= simple_form_for(@user, url: user_path(@user), html: { method: :put }, remote: true) do |f| %>

And that did it.