No documentation

# File actionpack/lib/action_dispatch/routing/mapper.rb, line 442def define_generate_prefix(app,name)returnunlessapp.respond_to?(:routes)&&app.routes.respond_to?(:define_mounted_helper)_route=@set.named_routes.routes[name.to_sym]_routes=@setapp.routes.define_mounted_helper(name)app.routes.class_evaldodefine_method:_generate_prefixdo|options|prefix_options=options.slice(*_route.segment_keys)# we must actually delete prefix segment keys to avoid passing them to next url_for_route.segment_keys.each{|k|options.delete(k)}prefix=_routes.url_helpers.send("#{name}_path",prefix_options)prefix=''ifprefix=='/'prefixendendend