Skip to content

Commit

Permalink
Merge pull request #31 from laruby2/kangkyu/up-ruby
Browse files Browse the repository at this point in the history
Add 'Go vote' button
  • Loading branch information
kangkyu authored Jul 10, 2024
2 parents 8512ee2 + bb87573 commit 2a1f845
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.6
3.2.4
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "3.1.6"
ruby "3.2.4"

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.0.2", ">= 7.0.2.4"
Expand All @@ -28,7 +28,7 @@ gem "stimulus-rails"
gem "jbuilder"

# Use Redis adapter to run Action Cable in production
gem "redis", "~> 4.0"
gem "redis", "~> 5.0.8"

# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
# gem "kredis"
Expand Down
10 changes: 7 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ GEM
xpath (~> 3.2)
coderay (1.1.3)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
crass (1.0.6)
date (3.3.3)
debug (1.8.0)
Expand Down Expand Up @@ -173,7 +174,10 @@ GEM
thor (~> 1.0)
zeitwerk (~> 2.5)
rake (13.0.6)
redis (4.8.1)
redis (5.0.8)
redis-client (>= 0.17.0)
redis-client (0.22.2)
connection_pool
regexp_parser (2.8.1)
reline (0.3.8)
io-console (~> 0.5)
Expand Down Expand Up @@ -237,7 +241,7 @@ DEPENDENCIES
pry-rails
puma (~> 5.0)
rails (~> 7.0.2, >= 7.0.2.4)
redis (~> 4.0)
redis (~> 5.0.8)
selenium-webdriver
sprockets-rails
stimulus-rails
Expand All @@ -248,7 +252,7 @@ DEPENDENCIES
webdrivers

RUBY VERSION
ruby 3.1.6p260
ruby 3.2.4p170

BUNDLED WITH
2.3.26
6 changes: 5 additions & 1 deletion app/views/rounds/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@
<% else %>
<div>
<p class="text-md mb-2">User <span class="font-bold"><%= @round.owner.username %></span> started it</p>
<% if !current_user.audience?(@round) %>
<div class="mt-8">
<% if current_user.audience?(@round) %>
<%= link_to 'Go vote', round_contestants_path(@round), method: :get, class: "bg-transparent hover:bg-indigo-500 text-indigo-700 font-semibold hover:text-white py-2 px-4 border border-indigo-500 hover:border-transparent rounded" %>
<% else %>
<%= button_to "Join the audience", new_round_audience_path(@round), method: :get, class: "bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4" %>
<% end %>
</div>
</div>
<% end %>
</div>
Expand Down

0 comments on commit 2a1f845

Please sign in to comment.