implement players

This commit is contained in:
2024-09-12 19:06:02 -07:00
parent c7df3aacfe
commit 6040c7aaf2
10 changed files with 94 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
# frozen_string_literal: true
module EuchreCamp
module Actions
module Players
class Show < EuchreCamp::Action
include Deps[ repo: 'repositories.players' ]
def handle(request, response)
requested_player = request.params[:id]
player = repo.by_id(requested_player)
response.render(view, player: player)
end
end
end
end
end
+5
View File
@@ -0,0 +1,5 @@
<h1>EuchreCamp::Views::Players::Show</h1>
<h2><%= player.name %></h2>
<h3><%= player.rating %></h3>
+11
View File
@@ -0,0 +1,11 @@
# frozen_string_literal: true
module EuchreCamp
module Views
module Players
class Show < EuchreCamp::View
expose :player
end
end
end
end