From 08fae4c3378db11d7f2c9bf0390b75c7567cc670 Mon Sep 17 00:00:00 2001 From: yakitorii Date: Mon, 12 Dec 2022 23:56:59 +0900 Subject: [PATCH 1/3] =?UTF-8?q?Drive=E3=82=92=E6=9C=89=E5=8A=B9=E3=81=AB?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hotwire-tw-demo/app/javascript/application.js | 1 - 1 file changed, 1 deletion(-) diff --git a/hotwire-tw-demo/app/javascript/application.js b/hotwire-tw-demo/app/javascript/application.js index cb95780..3016c21 100644 --- a/hotwire-tw-demo/app/javascript/application.js +++ b/hotwire-tw-demo/app/javascript/application.js @@ -2,4 +2,3 @@ import "@hotwired/turbo-rails" import "./controllers" import * as bootstrap from "bootstrap" -Turbo.session.drive = false From d1cf3948321fd1be5183bdbaabad7a96640f6f22 Mon Sep 17 00:00:00 2001 From: yakitorii Date: Tue, 13 Dec 2022 00:04:52 +0900 Subject: [PATCH 2/3] =?UTF-8?q?redirect=E6=99=82=E3=81=AE=E3=82=B9?= =?UTF-8?q?=E3=83=86=E3=83=BC=E3=82=BF=E3=82=B9=E3=82=B3=E3=83=BC=E3=83=89?= =?UTF-8?q?=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hotwire-tw-demo/app/controllers/emotions_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hotwire-tw-demo/app/controllers/emotions_controller.rb b/hotwire-tw-demo/app/controllers/emotions_controller.rb index 805e1b6..98b1d57 100644 --- a/hotwire-tw-demo/app/controllers/emotions_controller.rb +++ b/hotwire-tw-demo/app/controllers/emotions_controller.rb @@ -11,7 +11,7 @@ def create if @emotion.save redirect_to action: :index else - render :index + render :index, status: :unprocessable_entity end end @@ -40,7 +40,7 @@ def show def destroy @emotion.destroy - redirect_to action: :index + redirect_to action: :index, status: :see_other end def like From bde8807cbe226bcc1fc49bddaf9d28627973904d Mon Sep 17 00:00:00 2001 From: yakitorii Date: Tue, 13 Dec 2022 00:05:32 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AAform=E3=81=AEloc?= =?UTF-8?q?al:=20true=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hotwire-tw-demo/app/views/emotions/_new.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotwire-tw-demo/app/views/emotions/_new.html.erb b/hotwire-tw-demo/app/views/emotions/_new.html.erb index ead7f8d..c650f41 100644 --- a/hotwire-tw-demo/app/views/emotions/_new.html.erb +++ b/hotwire-tw-demo/app/views/emotions/_new.html.erb @@ -9,7 +9,7 @@ <% end %> - <%= form_with model: @emotion || Emotion.new, local: true do |form| %> + <%= form_with model: @emotion || Emotion.new do |form| %>
<%= form.label :icon, "きもち", class: "col-sm-2 col-form-label" %>