mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
document that default_url_options is cached per request [ci skip]
This commit is contained in:
parent
5c517ee442
commit
c865b8298f
1 changed files with 3 additions and 1 deletions
|
@ -185,7 +185,9 @@ end
|
||||||
|
|
||||||
These options will be used as a starting point when generating URLs, so it's possible they'll be overridden by the options passed to `url_for` calls.
|
These options will be used as a starting point when generating URLs, so it's possible they'll be overridden by the options passed to `url_for` calls.
|
||||||
|
|
||||||
If you define `default_url_options` in `ApplicationController`, as in the example above, it will be used for all URL generation. The method can also be defined in a specific controller, in which case it only affects URLs generated there.
|
If you define `default_url_options` in `ApplicationController`, as in the example above, these defaults will be used for all URL generation. The method can also be defined in a specific controller, in which case it only affects URLs generated there.
|
||||||
|
|
||||||
|
In a given request, the method is not actually called for every single generated URL; for performance reasons, the returned hash is cached, there is at most one invocation per request.
|
||||||
|
|
||||||
### Strong Parameters
|
### Strong Parameters
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue