File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1111 runs-on : ubuntu-latest
1212 strategy :
1313 matrix :
14- include :
14+ include :
1515 - ruby : " 2.7"
1616 gemfile : gemfiles/rails50_sprockets_3.gemfile
1717 - ruby : " 2.7"
2222 gemfile : gemfiles/rails70_sprockets_4.gemfile
2323 - ruby : " 3.3"
2424 gemfile : gemfiles/rails80_sprockets_4.gemfile
25-
2625 env :
2726 BUNDLE_GEMFILE : ${{ matrix.gemfile }}
2827 steps :
Original file line number Diff line number Diff line change @@ -24,9 +24,14 @@ def initialize(**options)
2424 sig { returns ( String ) }
2525 def generate
2626 # Ensure routes are loaded. If they're not, load them.
27+
2728 application = T . unsafe ( self . application )
28- if named_routes . empty? && application . respond_to? ( :reload_routes! , true )
29- application . reload_routes!
29+ if named_routes . empty?
30+ if Rails . version >= "8.0.0"
31+ application . reload_routes_unless_loaded
32+ elsif application . respond_to? ( :reload_routes! , true )
33+ application . reload_routes!
34+ end
3035 end
3136 content = File . read ( @configuration . source_file )
3237
You can’t perform that action at this time.
0 commit comments