diff options
Diffstat (limited to 'actionpack/lib')
-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 | ||||
-rw-r--r-- | actionpack/lib/action_pack/version.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/base.rb | 8 | ||||
-rw-r--r-- | actionpack/lib/action_view/compiled_templates.rb | 2 |
11 files changed, 32 insertions, 35 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 diff --git a/actionpack/lib/action_pack/version.rb b/actionpack/lib/action_pack/version.rb index 7940b1a3e5..c90816aa98 100644 --- a/actionpack/lib/action_pack/version.rb +++ b/actionpack/lib/action_pack/version.rb @@ -1,4 +1,4 @@ -module ActionPack +module ActionPack #:nodoc: module VERSION #:nodoc: MAJOR = 1 MINOR = 11 diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index e8facbc360..3e73159d26 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -221,7 +221,7 @@ module ActionView #:nodoc: # Renders the template present at <tt>template_path</tt>. If <tt>use_full_path</tt> is set to true, # it's relative to the template_root, otherwise it's absolute. The hash in <tt>local_assigns</tt> # is made available as local variables. - def render_file(template_path, use_full_path = true, local_assigns = {}) + def render_file(template_path, use_full_path = true, local_assigns = {}) #:nodoc: @first_render ||= template_path if use_full_path @@ -254,7 +254,7 @@ module ActionView #:nodoc: # Renders the template present at <tt>template_path</tt> (relative to the template_root). # The hash in <tt>local_assigns</tt> is made available as local variables. - def render(options = {}, old_local_assigns = {}, &block) + def render(options = {}, old_local_assigns = {}, &block) #:nodoc: if options.is_a?(String) render_file(options, true, old_local_assigns) elsif options == :update @@ -277,7 +277,7 @@ module ActionView #:nodoc: # Renders the +template+ which is given as a string as either rhtml or rxml depending on <tt>template_extension</tt>. # The hash in <tt>local_assigns</tt> is made available as local variables. - def render_template(template_extension, template, file_path = nil, local_assigns = {}) + def render_template(template_extension, template, file_path = nil, local_assigns = {}) #:nodoc: if handler = @@template_handlers[template_extension] template ||= read_template_file(file_path, template_extension) # Make sure that a lazyily-read template is loaded. delegate_render(handler, template, local_assigns) @@ -293,7 +293,7 @@ module ActionView #:nodoc: # Either, but not both, of template and file_path may be nil. If file_path is given, the template # will only be read if it has to be compiled. # - def compile_and_render_template(extension, template = nil, file_path = nil, local_assigns = {}) + def compile_and_render_template(extension, template = nil, file_path = nil, local_assigns = {}) #:nodoc: # compile the given template, if necessary if compile_template?(template, file_path, local_assigns) template ||= read_template_file(file_path, extension) diff --git a/actionpack/lib/action_view/compiled_templates.rb b/actionpack/lib/action_view/compiled_templates.rb index 9488432ba2..a00a7578bb 100644 --- a/actionpack/lib/action_view/compiled_templates.rb +++ b/actionpack/lib/action_view/compiled_templates.rb @@ -10,7 +10,7 @@ module ActionView # # To use a compiled template module, create a new instance and include it into the class # in which you want the template to be rendered. - class CompiledTemplates < Module + class CompiledTemplates < Module #:nodoc: attr_reader :method_names def initialize |