Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions hotwire-tw-demo/app/controllers/emotions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def create
if @emotion.save
redirect_to action: :index
else
render :index
render :index, status: :unprocessable_entity
end
end

Expand Down Expand Up @@ -40,7 +40,7 @@ def show

def destroy
@emotion.destroy
redirect_to action: :index
redirect_to action: :index, status: :see_other
end

def like
Expand Down
1 change: 0 additions & 1 deletion hotwire-tw-demo/app/javascript/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
import "@hotwired/turbo-rails"
import "./controllers"
import * as bootstrap from "bootstrap"
Turbo.session.drive = false
2 changes: 1 addition & 1 deletion hotwire-tw-demo/app/views/emotions/_new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</ul>
</div>
<% end %>
<%= form_with model: @emotion || Emotion.new, local: true do |form| %>
<%= form_with model: @emotion || Emotion.new do |form| %>
<div class="mb-3 row">
<%= form.label :icon, "きもち", class: "col-sm-2 col-form-label" %>
<div class="col-sm-10">
Expand Down