diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-28 03:19:27 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-28 03:19:27 +0000 |
commit | dfd953ea962675fdfd397a1e75c04b0536ff3c65 (patch) | |
tree | 97353b0ff6347f349cf9546c2fda450c5140ae83 /actionpack/lib/action_controller | |
parent | fed7d334f2904afc0955a6496859a8779f3d965e (diff) | |
download | rails-dfd953ea962675fdfd397a1e75c04b0536ff3c65.tar.gz rails-dfd953ea962675fdfd397a1e75c04b0536ff3c65.tar.bz2 rails-dfd953ea962675fdfd397a1e75c04b0536ff3c65.zip |
Fixed docs
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4079 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 31 | ||||
-rw-r--r-- | actionpack/lib/action_controller/components.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/dependencies.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/deprecated_redirects.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_controller/flash.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/integration.rb | 7 | ||||
-rw-r--r-- | actionpack/lib/action_controller/mime_type.rb | 3 | ||||
-rw-r--r-- | actionpack/lib/action_controller/vendor/xml_node.rb | 4 |
8 files changed, 26 insertions, 29 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 61307c379c..9d03a70588 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -681,7 +681,7 @@ module ActionController #:nodoc: result end - def render_action(action_name, status = nil, with_layout = true) + def render_action(action_name, status = nil, with_layout = true) #:nodoc: template = default_template_name(action_name.to_s) if with_layout && !template_exempt_from_layout?(template) render_with_layout(template, status) @@ -690,69 +690,68 @@ module ActionController #:nodoc: end end - def render_file(template_path, status = nil, use_full_path = false, locals = {}) + def render_file(template_path, status = nil, use_full_path = false, locals = {}) #:nodoc: add_variables_to_assigns assert_existence_of_template_file(template_path) if use_full_path logger.info("Rendering #{template_path}" + (status ? " (#{status})" : '')) if logger render_text(@template.render_file(template_path, use_full_path, locals), status) end - def render_template(template, status = nil, type = :rhtml, local_assigns = {}) + def render_template(template, status = nil, type = :rhtml, local_assigns = {}) #:nodoc: add_variables_to_assigns render_text(@template.render_template(type, template, nil, local_assigns), status) end - def render_text(text = nil, status = nil) + def render_text(text = nil, status = nil) #:nodoc: @performed_render = true @response.headers['Status'] = (status || DEFAULT_RENDER_STATUS_CODE).to_s @response.body = text end - def render_javascript(javascript, status = nil) + def render_javascript(javascript, status = nil) #:nodoc: @response.headers['Content-Type'] = 'text/javascript; charset=UTF-8' render_text(javascript, status) end - def render_xml(xml, status = nil) + def render_xml(xml, status = nil) #:nodoc: @response.headers['Content-Type'] = 'application/xml' render_text(xml, status) end - def render_nothing(status = nil) + def render_nothing(status = nil) #:nodoc: render_text(' ', status) end - def render_partial(partial_path = default_template_name, object = nil, local_assigns = nil, status = nil) + def render_partial(partial_path = default_template_name, object = nil, local_assigns = nil, status = nil) #:nodoc: add_variables_to_assigns render_text(@template.render_partial(partial_path, object, local_assigns), status) end - def render_partial_collection(partial_name, collection, partial_spacer_template = nil, local_assigns = nil, status = nil) + def render_partial_collection(partial_name, collection, partial_spacer_template = nil, local_assigns = nil, status = nil) #:nodoc: add_variables_to_assigns render_text(@template.render_partial_collection(partial_name, collection, partial_spacer_template, local_assigns), status) end - def render_with_layout(template_name = default_template_name, status = nil, layout = nil) + def render_with_layout(template_name = default_template_name, status = nil, layout = nil) #:nodoc: render_with_a_layout(template_name, status, layout) end - def render_without_layout(template_name = default_template_name, status = nil) + def render_without_layout(template_name = default_template_name, status = nil) #:nodoc: render_with_no_layout(template_name, status) end # Clears the rendered results, allowing for another render to be performed. - def erase_render_results + def erase_render_results #:nodoc: @response.body = nil @performed_render = false end - # Clears the redirected results from the headers, resets the status to 200 and returns # the URL that was used to redirect or nil if there was no redirected URL # Note that +redirect_to+ will change the body of the response to indicate a redirection. # The response body is not reset here, see +erase_render_results+ - def erase_redirect_results + def erase_redirect_results #:nodoc: @performed_redirect = false response.redirected_to = nil response.redirected_to_method_params = nil @@ -761,12 +760,12 @@ module ActionController #:nodoc: end # Erase both render and redirect results - def erase_results + def erase_results #:nodoc: erase_render_results erase_redirect_results end - def rewrite_options(options) + def rewrite_options(options) #:nodoc: if defaults = default_url_options(options) defaults.merge(options) else diff --git a/actionpack/lib/action_controller/components.rb b/actionpack/lib/action_controller/components.rb index cc57574f08..75005daaec 100644 --- a/actionpack/lib/action_controller/components.rb +++ b/actionpack/lib/action_controller/components.rb @@ -115,7 +115,7 @@ module ActionController #:nodoc: end end - def flash_with_components(refresh = false) + def flash_with_components(refresh = false) #:nodoc: if @flash.nil? || refresh @flash = if @parent_controller diff --git a/actionpack/lib/action_controller/dependencies.rb b/actionpack/lib/action_controller/dependencies.rb index c3a1da2701..2d437faaa6 100644 --- a/actionpack/lib/action_controller/dependencies.rb +++ b/actionpack/lib/action_controller/dependencies.rb @@ -28,7 +28,7 @@ module ActionController #:nodoc: # # Also note, that if the models follow the pattern of just 1 class per file in the form of MyClass => my_class.rb, then these # classes don't have to be required as Active Support will auto-require them. - module ClassMethods + module ClassMethods #:nodoc: # Specifies a variable number of models that this controller depends on. Models are normally Active Record classes or a similar # backend for modelling entity classes. def model(*models) diff --git a/actionpack/lib/action_controller/deprecated_redirects.rb b/actionpack/lib/action_controller/deprecated_redirects.rb index 264ac8de82..3e18aeab40 100644 --- a/actionpack/lib/action_controller/deprecated_redirects.rb +++ b/actionpack/lib/action_controller/deprecated_redirects.rb @@ -2,14 +2,14 @@ module ActionController class Base protected # Deprecated in favor of calling redirect_to directly with the path. - def redirect_to_path(path) + def redirect_to_path(path) #:nodoc: redirect_to(path) end # Deprecated in favor of calling redirect_to directly with the url. If the resource has moved permanently, it's possible to pass # true as the second parameter and the browser will get "301 Moved Permanently" instead of "302 Found". This can also be done through # just setting the headers["Status"] to "301 Moved Permanently" before using the redirect_to. - def redirect_to_url(url, permanently = false) + def redirect_to_url(url, permanently = false) #:nodoc: headers["Status"] = "301 Moved Permanently" if permanently redirect_to(url) end diff --git a/actionpack/lib/action_controller/flash.rb b/actionpack/lib/action_controller/flash.rb index 5a50d39efc..8877c33741 100644 --- a/actionpack/lib/action_controller/flash.rb +++ b/actionpack/lib/action_controller/flash.rb @@ -136,7 +136,7 @@ module ActionController #:nodoc: end end - module InstanceMethods + module InstanceMethods #:nodoc: def assign_shortcuts_with_flash(request, response) #:nodoc: assign_shortcuts_without_flash(request, response) flash(:refresh) diff --git a/actionpack/lib/action_controller/integration.rb b/actionpack/lib/action_controller/integration.rb index cd905329e6..54618ee68c 100644 --- a/actionpack/lib/action_controller/integration.rb +++ b/actionpack/lib/action_controller/integration.rb @@ -3,8 +3,7 @@ require 'stringio' require 'uri' module ActionController - module Integration - + module Integration #:nodoc: # An integration Session instance represents a set of requests and responses # performed sequentially by some virtual user. Becase you can instantiate # multiple sessions and run them side-by-side, you can also mimic (to some @@ -169,7 +168,7 @@ module ActionController end private - + class MockCGI < CGI #:nodoc: attr_accessor :stdinput, :stdoutput, :env_table @@ -319,7 +318,7 @@ module ActionController end end - module ClassMethods + module ClassMethods #:nodoc: mattr_accessor :last_instantiation def clear_last_instantiation! diff --git a/actionpack/lib/action_controller/mime_type.rb b/actionpack/lib/action_controller/mime_type.rb index 43c4b056f7..30cea88a44 100644 --- a/actionpack/lib/action_controller/mime_type.rb +++ b/actionpack/lib/action_controller/mime_type.rb @@ -1,6 +1,5 @@ module Mime - class Type - + class Type #:nodoc: # A simple helper class used in parsing the accept header class AcceptItem #:nodoc: attr_accessor :order, :name, :q diff --git a/actionpack/lib/action_controller/vendor/xml_node.rb b/actionpack/lib/action_controller/vendor/xml_node.rb index b495ebc207..d07bef142a 100644 --- a/actionpack/lib/action_controller/vendor/xml_node.rb +++ b/actionpack/lib/action_controller/vendor/xml_node.rb @@ -1,7 +1,7 @@ require 'rexml/document' # SimpleXML like xml parser. Written by leon breet from the ruby on rails Mailing list -class XmlNode +class XmlNode #:nodoc: attr :node def initialize(node, options = {}) @@ -81,7 +81,7 @@ class XmlNode end end -class XmlNodeList < Array +class XmlNodeList < Array #:nodoc: def [](i) i.is_a?(String) ? super(0)[i] : super(i) end |