app/controllers/in_progress_etds_controller.rb
# The Vue.js form uses this action to update the record.
The Vue.js form uses this action to update the record.
The Vue . js form uses this action to update the record .
def update
    @in_progress_etd = InProgressEtd.find(params[:id])
    authorize! :update, @in_progress_etd
    @in_progress_etd.data = prepare_etd_data.to_json
    if @in_progress_etd.save
      @data = @in_progress_etd.data
      render json: { in_progress_etd: @data, lastCompletedStep: current_step(@data), tab_name: tab_name }, status: 200
    else
      render json: { errors: @in_progress_etd.errors.messages }, status: 422
    end
  end
def update @in_progress_etd = InProgressEtd . find ( params [ :id ] ) authorize! :update , @in_progress_etd @in_progress_etd . data = prepare_etd_data . to_json if @in_progress_etd . save @data = @in_progress_etd . data render json : { in_progress_etd : @data , lastCompletedStep : current_step ( @data ) , tab_name : tab_name } , status : 200 else render json : { errors : @in_progress_etd . errors . messages } , status : 422 end end
The Vue.js form uses this action to update the record.
The Vue . js form uses this action to update the record .