diff options
Diffstat (limited to 'actionpack/lib/action_controller')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index fa7380f9b5..8b02731510 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -341,10 +341,8 @@ module ActionController #:nodoc: # * <tt>:host</tt> -- overrides the default (current) host if provided # * <tt>:protocol</tt> -- overrides the default (current) protocol if provided # - # All other keys are used to generate an appropriate path for the new URL. This is handled by the Routes mechanism, - # and the generated path is wildly configurable. The options that Routes does not use are - # are encoded into a typical query string. Once (and if) the link is followed, all provided options are made - # available to the controller in <tt>@params</tt>. + # The URL is generated from the remaining keys in the hash. A URL contains two key parts: the <base> and a query string. + # Routes composes a query string as the key/value pairs not included in the <base>. # # The default Routes setup supports a typical Rails path of "controller/action/id" where action and id are optional, with # action defaulting to 'index' when not given. Here are some typical url_for statements and their corresponding URLs: @@ -478,6 +476,12 @@ module ActionController #:nodoc: render_text "", status end + # Returns the result of the render as a string. + def render_to_string(template_name = default_template_name) + add_variables_to_assigns + @template.render_file(template_name) + end + # Sends the file by streaming it 4096 bytes at a time. This way the # whole file doesn't need to be read into memory at once. This makes # it feasible to send even large files. |