File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -185,8 +185,8 @@ def routes_list
185185 sig { params ( route : JourneyRoute ) . returns ( T ::Array [ StringArray ] ) }
186186 def mounted_app_routes ( route )
187187 rails_engine_app = T . unsafe ( app_from_route ( route ) )
188- if rails_engine_app . respond_to? ( :superclass ) &&
189- rails_engine_app . superclass == Rails ::Engine && !route . path . anchored
188+ if rails_engine_app . is_a? ( Class ) &&
189+ rails_engine_app < Rails ::Engine && !route . path . anchored
190190 rails_engine_app . routes . named_routes . flat_map do |_ , engine_route |
191191 route_helpers_if_match ( engine_route , route )
192192 end
@@ -198,9 +198,9 @@ def mounted_app_routes(route)
198198 sig { params ( route : JourneyRoute ) . returns ( T . untyped ) }
199199 def app_from_route ( route )
200200 app = route . app
201- # rails engine in Rails 4.2 use additional
201+ # Rails Engine can use additional
202202 # ActionDispatch::Routing::Mapper::Constraints, which contain app
203- if app . respond_to? ( :app ) && app . respond_to? ( :constraints )
203+ if app . is_a? ( ActionDispatch :: Routing :: Mapper :: Constraints )
204204 app . app
205205 else
206206 app
You can’t perform that action at this time.
0 commit comments