We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b37550 commit 31bd872Copy full SHA for 31bd872
lib/js_routes/instance.rb
@@ -27,8 +27,7 @@ def generate
27
28
application = T.unsafe(self.application)
29
if named_routes.empty?
30
- rails8_or_newer = Gem::Version.new(Rails.version) >= Gem::Version.new('8')
31
- if rails8_or_newer
+ if Rails.version >= "8.0.0"
32
application.reload_routes_unless_loaded
33
elsif application.respond_to?(:reload_routes!, true)
34
application.reload_routes!
0 commit comments