HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/gems/default/doc/actionpack-6.1.4.1/ri/ActionDispatch/Routing/UrlFor/url_for-i.ri
U:RDoc::AnyMethod[iI"url_for:ETI",ActionDispatch::Routing::UrlFor#url_for;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[I"OGenerate a URL based on the options provided, default_url_options and the ;TI"Froutes defined in routes.rb. The following options are supported:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List:
@type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;	[o;
;	[I"V<tt>:only_path</tt> - If true, the relative URL is returned. Defaults to +false+.;To;;0;	[o;
;	[I"I<tt>:protocol</tt> - The protocol to connect to. Defaults to 'http'.;To;;0;	[o;
;	[I"I<tt>:host</tt> - Specifies the host the link should be targeted at. ;TI":If <tt>:only_path</tt> is false, this option must be ;TI">provided either explicitly, or via +default_url_options+.;To;;0;	[o;
;	[I"W<tt>:subdomain</tt> - Specifies the subdomain of the link, using the +tld_length+ ;TI"+to split the subdomain from the host. ;TI"EIf false, removes all subdomains from the host part of the link.;To;;0;	[o;
;	[I"Q<tt>:domain</tt> - Specifies the domain of the link, using the +tld_length+ ;TI"'to split the domain from the host.;To;;0;	[o;
;	[I"R<tt>:tld_length</tt> - Number of labels the TLD id composed of, only used if ;TI"G<tt>:subdomain</tt> or <tt>:domain</tt> are supplied. Defaults to ;TI"P<tt>ActionDispatch::Http::URL.tld_length</tt>, which in turn defaults to 1.;To;;0;	[o;
;	[I"@<tt>:port</tt> - Optionally specify the port to connect to.;To;;0;	[o;
;	[I"B<tt>:anchor</tt> - An anchor name to be appended to the path.;To;;0;	[o;
;	[I"H<tt>:params</tt> - The query parameters to be appended to the path.;To;;0;	[o;
;	[I"V<tt>:trailing_slash</tt> - If true, adds a trailing slash, as in "/archive/2009/";To;;0;	[o;
;	[I"x<tt>:script_name</tt> - Specifies application path relative to domain root. If provided, prepends application path.;T@o;
;	[I"KAny other key (<tt>:controller</tt>, <tt>:action</tt>, etc.) given to ;TI"1+url_for+ is forwarded to the Routes module.;T@o:RDoc::Markup::Verbatim;	[I"Xurl_for controller: 'tasks', action: 'testing', host: 'somehost.org', port: '8080'
;TI"3# => 'http://somehost.org:8080/tasks/testing'
;TI"iurl_for controller: 'tasks', action: 'testing', host: 'somehost.org', anchor: 'ok', only_path: true
;TI"# => '/tasks/testing#ok'
;TI"Jurl_for controller: 'tasks', action: 'testing', trailing_slash: true
;TI"/# => 'http://somehost.org/tasks/testing/'
;TI"Xurl_for controller: 'tasks', action: 'testing', host: 'somehost.org', number: '33'
;TI"8# => 'http://somehost.org/tasks/testing?number=33'
;TI"aurl_for controller: 'tasks', action: 'testing', host: 'somehost.org', script_name: "/myapp"
;TI"4# => 'http://somehost.org/myapp/tasks/testing'
;TI"rurl_for controller: 'tasks', action: 'testing', host: 'somehost.org', script_name: "/myapp", only_path: true
;TI"!# => '/myapp/tasks/testing'
;T:@format0o;
;	[	I"PMissing routes keys may be filled in from the current request's parameters ;TI"M(e.g. +:controller+, +:action+, +:id+ and any other parameters that are ;TI"Iplaced in the path). Given that the current action has been reached ;TI"#through <tt>GET /users/1</tt>:;T@o;;	[I"Eurl_for(only_path: true)                        # => '/users/1'
;TI"Jurl_for(only_path: true, action: 'edit')        # => '/users/1/edit'
;TI"Jurl_for(only_path: true, action: 'edit', id: 2) # => '/users/2/edit'
;T;0o;
;	[	I"MNotice that no +:id+ parameter was provided to the first +url_for+ call ;TI"Kand the helper used the one from the route's path. Any path parameter ;TI"Nimplicitly used by +url_for+ can always be overwritten like shown on the ;TI"last +url_for+ calls.;T:
@fileI"+lib/action_dispatch/routing/url_for.rb;T:0@omit_headings_from_table_of_contents_below000[I"(options = nil);T@sFI"UrlFor;TcRDoc::NormalModule00