class method
self.path_for
Ruby on Rails 7.0.10
Since v4.2.9Signature
self.path_for(options)
No documentation comment.
Parameters
-
optionsreq
Source
# File actionpack/lib/action_dispatch/http/url.rb, line 70
def path_for(options)
path = options[:script_name].to_s.chomp("/")
path << options[:path] if options.key?(:path)
path = "/" if options[:trailing_slash] && path.blank?
add_params(path, options[:params]) if options.key?(:params)
add_anchor(path, options[:anchor]) if options.key?(:anchor)
path
end
Defined in actionpack/lib/action_dispatch/http/url.rb line 70
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Http::URL