tidy up, add git hash to src link
This commit is contained in:
parent
c95a61fc05
commit
b483ff56c6
|
@ -52,7 +52,7 @@ class MachinesController < ApplicationController
|
|||
@machine.destroy
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to machines_url, notice: 'Machine was successfully destroyed.' }
|
||||
format.html { redirect_to machines_url, notice: 'Machine was successfully removed.' }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -49,7 +49,7 @@ class PlayersController < ApplicationController
|
|||
@player.destroy
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to players_url, notice: 'Player was successfully destroyed.' }
|
||||
format.html { redirect_to players_url, notice: 'Player was successfully removed.' }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<p style="color: green"><%= notice %></p>
|
||||
<% if not notice.nil? %><p style="color: green"><%= notice %></p><% end %>
|
||||
|
||||
<%= render "form", machine: @machine %>
|
||||
|
||||
<div>
|
||||
<%= button_to "Delete #{@machine.name}", @machine, method: :delete %>
|
||||
<%= link_to "Delete #{@machine.name} ❌", @machine, data: {
|
||||
turbo_method: :delete,
|
||||
turbo_confirm: "Are you sure you want to remove #{@machine.name}?"} %>
|
||||
</div>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<h1>Knockout</h1>
|
||||
<p>To start the tournament, add players and make sure that the pins are up to date. Then hit randomize to automatically pick teams!</p>
|
||||
<p>The source code for this app can be found <a href="https://tildegit.org/ben/pinrails">here</a>.</p>
|
||||
<p>The source code for this app can be found <%= link_to 'here', "#{GIT_REPO}/src/commit/#{GIT_SHA}" %>.</p>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<% if player.paid %>✓
|
||||
<% end %></td>
|
||||
<td><%= player.strikes %></td>
|
||||
<td><%= link_to "X", player, data: {
|
||||
<td><%= link_to "❌", player, data: {
|
||||
turbo_method: :delete,
|
||||
turbo_confirm: "Are you sure you want to remove #{player.name}?"
|
||||
} %></td>
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<p style="color: green"><%= notice %></p>
|
||||
<% if not notice.nil? %><p style="color: green"><%= notice %></p><% end %>
|
||||
|
||||
<%= render "form", player: @player %>
|
||||
|
||||
<div>
|
||||
<%= button_to "Delete #{@player.name}", @player, method: :delete %>
|
||||
<%= link_to "Delete #{@player.name} ❌", @player, data: {
|
||||
turbo_method: :delete,
|
||||
turbo_confirm: "Are you sure you want to remove #{@player.name}?"} %>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
GIT_SHA = `git rev-parse HEAD`.chomp
|
||||
GIT_REPO = 'https://tildegit.org/ben/pinrails'
|
|
@ -37,6 +37,6 @@ class MachinesTest < ApplicationSystemTestCase
|
|||
visit machine_url(@machine)
|
||||
click_on "Delete #{@machine.name}", match: :first
|
||||
|
||||
assert_text 'Machine was successfully destroyed'
|
||||
assert_text 'Machine was successfully removed'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -39,6 +39,6 @@ class PlayersTest < ApplicationSystemTestCase
|
|||
visit player_url(@player)
|
||||
click_on "Delete #{@player.name}", match: :first
|
||||
|
||||
assert_text 'Player was successfully destroyed'
|
||||
assert_text 'Player was successfully removed'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue