私はrailsを使い慣れていません。保存ボタンをクリックしてフォームを送信すると、customer_detailsフォームが作成されました。私はダウンロードボタンを使用してフォームをダウンロードすることができますform.soのすべての内容でページを編集します。 This is what im getting after saved the form 保存されたフォームのパラメータを使用してフォームを送信すると、レールを編集ページにリダイレクト
def create
@customer_detail = CustomerDetail.new(customer_detail_params)
@customer_detail.company_profile_id = current_user.company_profile.id
respond_to do |format|
if @customer_detail.save
format.html { redirect_to edit_customer_detail_path(@customer_detail), notice: 'customerDetails was successfully created.' }
else
format.html { render :new }
end
end
end
def edit
@customer_details = CustomerDetail.find(params[:id])
end
編集フォームを追加して編集アクション – Thorin
私は編集アクションで自分の質問を編集しました。 –
質問のedit.html.erbを追加してください – Thorin