Named Route Collection
module ActionDispatch
module Routing
class RouteSet
def initialize(request_class = ActionDispatch::Request)
self.named_routes = NamedRouteCollection.new
# ...
end
end
end
end各个实例方法
routes
url_helpers_module
route_defined?
helper_names
clear! & clear
add & []= # 主要作用,添加 x_url 和 x_path 辅助方法
get & []
names
path_helpers_moduleUrl Helper
哪里调用它了?
最后更新于