File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed
Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 11source 'https://rubygems.org'
22git_source ( :github ) { |repo | "https://github.com/#{ repo } .git" }
33
4- ruby ' 3.3.10'
4+ ruby ">= 3.3.3" , "<= 3.3.10"
55
66gem 'concurrent-ruby' , '1.3.4'
77# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
Original file line number Diff line number Diff line change @@ -677,7 +677,7 @@ DEPENDENCIES
677677 web-console
678678
679679RUBY VERSION
680- ruby 3.3.3p89
680+ ruby 3.3.5p100
681681
682682BUNDLED WITH
683683 2.5.15
Original file line number Diff line number Diff line change @@ -75,10 +75,10 @@ def humanize
7575 end
7676
7777 def segment_progress
78- if total_segments . zero?
78+ if segments_count . to_i . zero?
7979 0
8080 else
81- ( total_verses / total_segments . to_f ) * 100
81+ ( total_verses / segments_count . to_i . to_f ) * 100
8282 end
8383 end
8484
@@ -139,7 +139,7 @@ def total_verses
139139 end
140140
141141 def total_segments
142- read_attribute ( :total_segments ) . to_f
142+ segments_count
143143 end
144144
145145 def wav_parts
Original file line number Diff line number Diff line change 5454 < th scope ="row " class ="tw-py-2 tw-pl-2 "> <%= file . chapter_id %> </ th >
5555
5656 < td class ="tw-py-2 ">
57- <% progress = file . segment_progress %>
57+ <% progress = [ file . segment_progress , 100 ] . min %>
5858 < div class ="tw-w-full tw-bg-gray-200 tw-rounded-full tw-h-6 ">
5959 < div class ="tw-h-6 tw-rounded-full tw-text-white tw-text-xs tw-flex tw-items-center tw-justify-center tw-transition-all tw-duration-300 tw-bg-green-500 "
6060 role ="progressbar "
6161 aria-valuenow ="<%= progress %> "
62- aria-valuemin ="0 " aria-valuemax ="100 "
62+ aria-valuemin ="0 "
63+ aria-valuemax ="100 "
6364 style ="width: <%= progress %> %; min-width: 30px "
6465 >
6566 <%= progress %> %
You can’t perform that action at this time.
0 commit comments