Changeset 1731
- Timestamp:
- 07/06/05 09:32:00 (3 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/caching.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/code_generation.rb (modified) (4 diffs)
- trunk/actionpack/lib/action_controller/layout.rb (modified) (2 diffs)
- trunk/actionpack/lib/action_controller/routing.rb (modified) (9 diffs)
- trunk/actionpack/lib/action_controller/upload_progress.rb (modified) (3 diffs)
- trunk/actionpack/lib/action_controller/vendor/xml_simple.rb (modified) (2 diffs)
- trunk/actionpack/lib/action_controller/verification.rb (modified) (2 diffs)
- trunk/actionpack/lib/action_view/helpers/upload_progress_helper.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r1728 r1731 1 1 *1.9.0* (6 July, 2005) 2 3 * Fixed that a SessionRestoreError was thrown if a model object was placed in the session that wasn't available to all controllers4 2 5 3 * Added logging of the request URI in the benchmark statement (makes it easy to grep for slow actions) trunk/actionpack/lib/action_controller/caching.rb
r1423 r1731 459 459 460 460 if defined?(ActiveRecord::Observer) 461 class Sweeper < ActiveRecord::Observer 461 class Sweeper < ActiveRecord::Observer #:nodoc: 462 462 attr_accessor :controller 463 463 trunk/actionpack/lib/action_controller/code_generation.rb
r1557 r1731 1 1 module ActionController 2 module CodeGeneration #:nodoc 3 class GenerationError < StandardError 2 module CodeGeneration #:nodoc: 3 class GenerationError < StandardError #:nodoc: 4 4 end 5 5 6 class Source 6 class Source #:nodoc: 7 7 attr_reader :lines, :indentation_level 8 8 IndentationString = ' ' … … 25 25 end 26 26 27 class CodeGenerator 27 class CodeGenerator #:nodoc: 28 28 attr_accessor :source, :locals 29 29 def initialize(source = nil) … … 73 73 end 74 74 75 class RecognitionGenerator < CodeGenerator 75 class RecognitionGenerator < CodeGenerator #:nodoc: 76 76 Attributes = [:after, :before, :current, :results, :constants, :depth, :move_ahead, :finish_statement] 77 77 attr_accessor(*Attributes) … … 164 164 end 165 165 166 class GenerationGenerator < CodeGenerator 166 class GenerationGenerator < CodeGenerator #:nodoc: 167 167 Attributes = [:after, :before, :current, :segments] 168 168 attr_accessor(*Attributes) trunk/actionpack/lib/action_controller/layout.rb
r1728 r1731 126 126 # If you have a layout that by default is applied to all the actions of a controller, you still have the option of rendering 127 127 # a given action or set of actions without a layout, or restricting a layout to only a single action or a set of actions. The 128 # +:only+ and +:except+options can be passed to the layout call. For example:128 # <tt>:only</tt> and <tt>:except</tt> options can be passed to the layout call. For example: 129 129 # 130 130 # class WeblogController < ActionController::Base … … 138 138 # around the rendered view. 139 139 # 140 # Both the +:only+ and +:except+ condition can accept an arbitrary number of method references, so +:except => [ :rss, :text_only ]+141 # is valid, as is # +:except => :rss+.140 # Both the <tt>:only</tt> and <tt>:except</tt> condition can accept an arbitrary number of method references, so 141 # #<tt>:except => [ :rss, :text_only ]</tt> is valid, as is <tt>:except => :rss</tt>. 142 142 # 143 143 # == Using a different layout in the action render call trunk/actionpack/lib/action_controller/routing.rb
r1713 r1731 1 1 module ActionController 2 module Routing 2 module Routing #:nodoc: 3 3 class << self 4 5 4 def expiry_hash(options, recall) 6 5 k = v = nil … … 45 44 end 46 45 47 class Component #:nodoc 46 class Component #:nodoc: 48 47 def dynamic?() false end 49 48 def optional?() false end … … 62 61 end 63 62 64 class StaticComponent < Component #:nodoc 63 class StaticComponent < Component #:nodoc: 65 64 attr_reader :value 66 65 … … 80 79 end 81 80 82 class DynamicComponent < Component #:nodoc 81 class DynamicComponent < Component #:nodoc: 83 82 attr_reader :key, :default 84 83 attr_accessor :condition … … 175 174 end 176 175 177 class ControllerComponent < DynamicComponent #:nodoc 176 class ControllerComponent < DynamicComponent #:nodoc: 178 177 def key() :controller end 179 178 … … 226 225 end 227 226 228 class PathComponent < DynamicComponent #:nodoc 227 class PathComponent < DynamicComponent #:nodoc: 229 228 def optional?() true end 230 229 def default() '' end … … 256 255 end 257 256 258 class Route 257 class Route #:nodoc: 259 258 attr_accessor :components, :known 260 259 attr_reader :path, :options, :keys … … 352 351 end 353 352 354 class RouteSet 353 class RouteSet #:nodoc: 355 354 attr_reader :routes, :categories, :controller_to_selector 356 355 def initialize … … 564 563 end 565 564 566 module NamedRoutes 565 module NamedRoutes #:nodoc: 567 566 Helpers = [] 568 567 class << self trunk/actionpack/lib/action_controller/upload_progress.rb
r1570 r1731 7 7 8 8 module ActionController #:nodoc: 9 # == THIS IS AN EXPERIMENTAL FEATURE 10 # 11 # Which means that it doesn't yet work on all systems. We're still working on full 12 # compatibility. It's thus not advised to use this unless you've verified it to work 13 # fully on all the systems that is a part of your environment. Consider this an extended 14 # preview. 15 # 9 16 # == Action Pack Upload Progress for multipart uploads 10 17 # … … 125 132 # render :inline => '<%= upload_progress_status %> <div>Updated at <%= Time.now %></div>', :layout => false 126 133 # end 127 # 128 # 129 module UploadProgress #:nodoc: 134 module UploadProgress 130 135 def self.append_features(base) #:nodoc: 131 136 super … … 263 268 end 264 269 270 # == THIS IS AN EXPERIMENTAL FEATURE 271 # 272 # Which means that it doesn't yet work on all systems. We're still working on full 273 # compatibility. It's thus not advised to use this unless you've verified it to work 274 # fully on all the systems that is a part of your environment. Consider this an extended 275 # preview. 276 # 265 277 # Upload Progress abstracts the progress of an upload. It's used by the 266 278 # multipart progress IO that keeps track of the upload progress and creating trunk/actionpack/lib/action_controller/vendor/xml_simple.rb
r1303 r1731 8 8 9 9 # Easy API to maintain XML (especially configuration files). 10 class XmlSimple 10 class XmlSimple #:nodoc: 11 11 include REXML 12 12 … … 15 15 # A simple cache for XML documents that were already transformed 16 16 # by xml_in. 17 class Cache 17 class Cache #:nodoc: 18 18 # Creates and initializes a new Cache object. 19 19 def initialize trunk/actionpack/lib/action_controller/verification.rb
r1463 r1731 1 1 module ActionController #:nodoc: 2 3 # This module provides a class-level method for specifying that certain 4 # actions are guarded against being called without certain prerequisites 5 # being met. This is essentially a special kind of before_filter. 6 # 7 # An action may be guarded against being invoked without certain request 8 # parameters being set, or without certain session values existing. 9 # 10 # When a verification is violated, values may be inserted into the flash, and 11 # a specified redirection is triggered. 12 # 13 # Usage: 14 # 15 # class GlobalController < ActionController::Base 16 # # prevent the #update_settings action from being invoked unless 17 # # the 'admin_privileges' request parameter exists. 18 # verify :params => "admin_privileges", :only => :update_post, 19 # :redirect_to => { :action => "settings" } 20 # 21 # # disallow a post from being updated if there was no information 22 # # submitted with the post, and if there is no active post in the 23 # # session, and if there is no "note" key in the flash. 24 # verify :params => "post", :session => "post", "flash" => "note", 25 # :only => :update_post, 26 # :add_flash => { "alert" => "Failed to create your message" }, 27 # :redirect_to => :category_url 28 # 29 module Verification 2 module Verification #:nodoc: 30 3 def self.append_features(base) #:nodoc: 31 4 super … … 33 6 end 34 7 8 # This module provides a class-level method for specifying that certain 9 # actions are guarded against being called without certain prerequisites 10 # being met. This is essentially a special kind of before_filter. 11 # 12 # An action may be guarded against being invoked without certain request 13 # parameters being set, or without certain session values existing. 14 # 15 # When a verification is violated, values may be inserted into the flash, and 16 # a specified redirection is triggered. 17 # 18 # Usage: 19 # 20 # class GlobalController < ActionController::Base 21 # # prevent the #update_settings action from being invoked unless 22 # # the 'admin_privileges' request parameter exists. 23 # verify :params => "admin_privileges", :only => :update_post, 24 # :redirect_to => { :action => "settings" } 25 # 26 # # disallow a post from being updated if there was no information 27 # # submitted with the post, and if there is no active post in the 28 # # session, and if there is no "note" key in the flash. 29 # verify :params => "post", :session => "post", "flash" => "note", 30 # :only => :update_post, 31 # :add_flash => { "alert" => "Failed to create your message" }, 32 # :redirect_to => :category_url 33 # 35 34 module ClassMethods 36 35 # Verify the given actions so that if certain prerequisites are not met, trunk/actionpack/lib/action_view/helpers/upload_progress_helper.rb
r1580 r1731 1 1 module ActionView 2 2 module Helpers 3 # == THIS IS AN EXPERIMENTAL FEATURE 4 # 5 # Which means that it doesn't yet work on all systems. We're still working on full 6 # compatibility. It's thus not advised to use this unless you've verified it to work 7 # fully on all the systems that is a part of your environment. Consider this an extended 8 # preview. 9 # 3 10 # Provides a set of methods to be used in your views to help with the 4 11 # rendering of Ajax enabled status updating during a multipart upload. … … 51 58 # 52 59 # Default styling is included with the scaffolding CSS. 53 # 54 module UploadProgressHelper #:nodoc: 60 module UploadProgressHelper 55 61 unless const_defined? :FREQUENCY 56 62 # Default number of seconds between client updates