Skip to content

Commit 31bd872

Browse files
authored
Update lib/js_routes/instance.rb
1 parent 2b37550 commit 31bd872

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/js_routes/instance.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ def generate
2727

2828
application = T.unsafe(self.application)
2929
if named_routes.empty?
30-
rails8_or_newer = Gem::Version.new(Rails.version) >= Gem::Version.new('8')
31-
if rails8_or_newer
30+
if Rails.version >= "8.0.0"
3231
application.reload_routes_unless_loaded
3332
elsif application.respond_to?(:reload_routes!, true)
3433
application.reload_routes!

0 commit comments

Comments
 (0)