class method
self.with
Ruby on Rails 5.2.8.1
Since v3.1.12Signature
self.with(routes, include_path_helpers = true)
No documentation comment.
Parameters
-
routesreq -
include_path_helpersopt = true
Source
# File actionpack/lib/abstract_controller/railties/routes_helpers.rb, line 6
def self.with(routes, include_path_helpers = true)
Module.new do
define_method(:inherited) do |klass|
super(klass)
if namespace = klass.parents.detect { |m| m.respond_to?(:railtie_routes_url_helpers) }
klass.include(namespace.railtie_routes_url_helpers(include_path_helpers))
else
klass.include(routes.url_helpers(include_path_helpers))
end
end
end
end
Defined in actionpack/lib/abstract_controller/railties/routes_helpers.rb line 6
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in AbstractController::Railties::RoutesHelpers