Changeset 4079
- Timestamp:
- 03/28/06 03:19:27 (3 years ago)
- Files:
-
- trunk/actionpack/lib/action_controller/base.rb (modified) (7 diffs)
- trunk/actionpack/lib/action_controller/components.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/dependencies.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/deprecated_redirects.rb (modified) (2 diffs)
- trunk/actionpack/lib/action_controller/flash.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/integration.rb (modified) (3 diffs)
- trunk/actionpack/lib/action_controller/mime_type.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/vendor/xml_node.rb (modified) (2 diffs)
- trunk/actionpack/lib/action_pack/version.rb (modified) (1 diff)
- trunk/actionpack/lib/action_view/base.rb (modified) (4 diffs)
- trunk/actionpack/lib/action_view/compiled_templates.rb (modified) (1 diff)
- trunk/actionpack/Rakefile (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/lib/action_controller/base.rb
r4072 r4079 682 682 end 683 683 684 def render_action(action_name, status = nil, with_layout = true) 684 def render_action(action_name, status = nil, with_layout = true) #:nodoc: 685 685 template = default_template_name(action_name.to_s) 686 686 if with_layout && !template_exempt_from_layout?(template) … … 691 691 end 692 692 693 def render_file(template_path, status = nil, use_full_path = false, locals = {}) 693 def render_file(template_path, status = nil, use_full_path = false, locals = {}) #:nodoc: 694 694 add_variables_to_assigns 695 695 assert_existence_of_template_file(template_path) if use_full_path … … 698 698 end 699 699 700 def render_template(template, status = nil, type = :rhtml, local_assigns = {}) 700 def render_template(template, status = nil, type = :rhtml, local_assigns = {}) #:nodoc: 701 701 add_variables_to_assigns 702 702 render_text(@template.render_template(type, template, nil, local_assigns), status) 703 703 end 704 704 705 def render_text(text = nil, status = nil) 705 def render_text(text = nil, status = nil) #:nodoc: 706 706 @performed_render = true 707 707 @response.headers['Status'] = (status || DEFAULT_RENDER_STATUS_CODE).to_s … … 709 709 end 710 710 711 def render_javascript(javascript, status = nil) 711 def render_javascript(javascript, status = nil) #:nodoc: 712 712 @response.headers['Content-Type'] = 'text/javascript; charset=UTF-8' 713 713 render_text(javascript, status) 714 714 end 715 715 716 def render_xml(xml, status = nil) 716 def render_xml(xml, status = nil) #:nodoc: 717 717 @response.headers['Content-Type'] = 'application/xml' 718 718 render_text(xml, status) 719 719 end 720 720 721 def render_nothing(status = nil) 721 def render_nothing(status = nil) #:nodoc: 722 722 render_text(' ', status) 723 723 end 724 724 725 def render_partial(partial_path = default_template_name, object = nil, local_assigns = nil, status = nil) 725 def render_partial(partial_path = default_template_name, object = nil, local_assigns = nil, status = nil) #:nodoc: 726 726 add_variables_to_assigns 727 727 render_text(@template.render_partial(partial_path, object, local_assigns), status) 728 728 end 729 729 730 def render_partial_collection(partial_name, collection, partial_spacer_template = nil, local_assigns = nil, status = nil) 730 def render_partial_collection(partial_name, collection, partial_spacer_template = nil, local_assigns = nil, status = nil) #:nodoc: 731 731 add_variables_to_assigns 732 732 render_text(@template.render_partial_collection(partial_name, collection, partial_spacer_template, local_assigns), status) 733 733 end 734 734 735 def render_with_layout(template_name = default_template_name, status = nil, layout = nil) 735 def render_with_layout(template_name = default_template_name, status = nil, layout = nil) #:nodoc: 736 736 render_with_a_layout(template_name, status, layout) 737 737 end 738 738 739 def render_without_layout(template_name = default_template_name, status = nil) 739 def render_without_layout(template_name = default_template_name, status = nil) #:nodoc: 740 740 render_with_no_layout(template_name, status) 741 741 end … … 743 743 744 744 # Clears the rendered results, allowing for another render to be performed. 745 def erase_render_results 745 def erase_render_results #:nodoc: 746 746 @response.body = nil 747 747 @performed_render = false 748 748 end 749 750 749 751 750 # Clears the redirected results from the headers, resets the status to 200 and returns … … 753 752 # Note that +redirect_to+ will change the body of the response to indicate a redirection. 754 753 # The response body is not reset here, see +erase_render_results+ 755 def erase_redirect_results 754 def erase_redirect_results #:nodoc: 756 755 @performed_redirect = false 757 756 response.redirected_to = nil … … 762 761 763 762 # Erase both render and redirect results 764 def erase_results 763 def erase_results #:nodoc: 765 764 erase_render_results 766 765 erase_redirect_results 767 766 end 768 767 769 def rewrite_options(options) 768 def rewrite_options(options) #:nodoc: 770 769 if defaults = default_url_options(options) 771 770 defaults.merge(options) trunk/actionpack/lib/action_controller/components.rb
r3989 r4079 116 116 end 117 117 118 def flash_with_components(refresh = false) 118 def flash_with_components(refresh = false) #:nodoc: 119 119 if @flash.nil? || refresh 120 120 @flash = trunk/actionpack/lib/action_controller/dependencies.rb
r2749 r4079 29 29 # 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 30 30 # classes don't have to be required as Active Support will auto-require them. 31 module ClassMethods 31 module ClassMethods #:nodoc: 32 32 # Specifies a variable number of models that this controller depends on. Models are normally Active Record classes or a similar 33 33 # backend for modelling entity classes. trunk/actionpack/lib/action_controller/deprecated_redirects.rb
r1915 r4079 3 3 protected 4 4 # Deprecated in favor of calling redirect_to directly with the path. 5 def redirect_to_path(path) 5 def redirect_to_path(path) #:nodoc: 6 6 redirect_to(path) 7 7 end … … 10 10 # true as the second parameter and the browser will get "301 Moved Permanently" instead of "302 Found". This can also be done through 11 11 # just setting the headers["Status"] to "301 Moved Permanently" before using the redirect_to. 12 def redirect_to_url(url, permanently = false) 12 def redirect_to_url(url, permanently = false) #:nodoc: 13 13 headers["Status"] = "301 Moved Permanently" if permanently 14 14 redirect_to(url) trunk/actionpack/lib/action_controller/flash.rb
r3834 r4079 137 137 end 138 138 139 module InstanceMethods 139 module InstanceMethods #:nodoc: 140 140 def assign_shortcuts_with_flash(request, response) #:nodoc: 141 141 assign_shortcuts_without_flash(request, response) trunk/actionpack/lib/action_controller/integration.rb
r4026 r4079 4 4 5 5 module ActionController 6 module Integration 7 6 module Integration #:nodoc: 8 7 # An integration Session instance represents a set of requests and responses 9 8 # performed sequentially by some virtual user. Becase you can instantiate … … 170 169 171 170 private 172 171 173 172 class MockCGI < CGI #:nodoc: 174 173 attr_accessor :stdinput, :stdoutput, :env_table … … 320 319 end 321 320 322 module ClassMethods 321 module ClassMethods #:nodoc: 323 322 mattr_accessor :last_instantiation 324 323 trunk/actionpack/lib/action_controller/mime_type.rb
r3917 r4079 1 1 module Mime 2 class Type 3 2 class Type #:nodoc: 4 3 # A simple helper class used in parsing the accept header 5 4 class AcceptItem #:nodoc: trunk/actionpack/lib/action_controller/vendor/xml_node.rb
r3782 r4079 2 2 3 3 # SimpleXML like xml parser. Written by leon breet from the ruby on rails Mailing list 4 class XmlNode 4 class XmlNode #:nodoc: 5 5 attr :node 6 6 … … 82 82 end 83 83 84 class XmlNodeList < Array 84 class XmlNodeList < Array #:nodoc: 85 85 def [](i) 86 86 i.is_a?(String) ? super(0)[i] : super(i) trunk/actionpack/lib/action_pack/version.rb
r3543 r4079 1 module ActionPack 1 module ActionPack #:nodoc: 2 2 module VERSION #:nodoc: 3 3 MAJOR = 1 trunk/actionpack/lib/action_view/base.rb
r4056 r4079 222 222 # it's relative to the template_root, otherwise it's absolute. The hash in <tt>local_assigns</tt> 223 223 # is made available as local variables. 224 def render_file(template_path, use_full_path = true, local_assigns = {}) 224 def render_file(template_path, use_full_path = true, local_assigns = {}) #:nodoc: 225 225 @first_render ||= template_path 226 226 … … 255 255 # Renders the template present at <tt>template_path</tt> (relative to the template_root). 256 256 # The hash in <tt>local_assigns</tt> is made available as local variables. 257 def render(options = {}, old_local_assigns = {}, &block) 257 def render(options = {}, old_local_assigns = {}, &block) #:nodoc: 258 258 if options.is_a?(String) 259 259 render_file(options, true, old_local_assigns) … … 278 278 # Renders the +template+ which is given as a string as either rhtml or rxml depending on <tt>template_extension</tt>. 279 279 # The hash in <tt>local_assigns</tt> is made available as local variables. 280 def render_template(template_extension, template, file_path = nil, local_assigns = {}) 280 def render_template(template_extension, template, file_path = nil, local_assigns = {}) #:nodoc: 281 281 if handler = @@template_handlers[template_extension] 282 282 template ||= read_template_file(file_path, template_extension) # Make sure that a lazyily-read template is loaded. … … 294 294 # will only be read if it has to be compiled. 295 295 # 296 def compile_and_render_template(extension, template = nil, file_path = nil, local_assigns = {}) 296 def compile_and_render_template(extension, template = nil, file_path = nil, local_assigns = {}) #:nodoc: 297 297 # compile the given template, if necessary 298 298 if compile_template?(template, file_path, local_assigns) trunk/actionpack/lib/action_view/compiled_templates.rb
r2058 r4079 11 11 # To use a compiled template module, create a new instance and include it into the class 12 12 # in which you want the template to be rendered. 13 class CompiledTemplates < Module 13 class CompiledTemplates < Module #:nodoc: 14 14 attr_reader :method_names 15 15 trunk/actionpack/Rakefile
r3801 r4079 45 45 rdoc.rdoc_dir = 'doc' 46 46 rdoc.title = "Action Pack -- On rails from request to response" 47 rdoc.options << '--line-numbers' << '--inline-source' << '--main README'47 rdoc.options << '--line-numbers' << '--inline-source' 48 48 rdoc.template = "#{ENV['template']}.rb" if ENV['template'] 49 49 rdoc.rdoc_files.include('README', 'RUNNING_UNIT_TESTS', 'CHANGELOG') 50 50 rdoc.rdoc_files.include('lib/**/*.rb') 51 51 } 52 53 52 54 53 # Create compressed packages