Changeset 117
- Timestamp:
- 12/12/04 12:43:48 (4 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (2 diffs)
- trunk/actionpack/lib/action_controller/cgi_process.rb (modified) (3 diffs)
- trunk/actionpack/lib/action_controller/cookies.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r115 r117 1 1 *SVN* 2 3 * Fixed CgiRequest so that it'll now accept session options with Symbols as keys (as the documentation points out) [Suggested by Andreas] 4 5 * Added that render_partial will always by default include a counter with value 1 unless there is a counter passed in via the 6 local_assigns hash that overrides it. As a result, render_collection_of_partials can still be written in terms of render_partial 7 and partials that make use of a counter can be called without problems from both render_collection_of_partials as well as 8 render_partial #295 [marcel] 2 9 3 10 * Fixed CgiRequest#out to fall back to #write if $stdout doesn't have #syswrite [bitsweat] … … 120 127 121 128 * Fixed that link_to would escape & in the url again after url_for already had done so 129 122 130 123 131 *0.9.5* (28) trunk/actionpack/lib/action_controller/cgi_process.rb
r61 r117 37 37 38 38 DEFAULT_SESSION_OPTIONS = 39 { "database_manager" => CGI::Session::PStore, "prefix" => "ruby_sess.", "session_path"=> "/" }39 { :database_manager => CGI::Session::PStore, :prefix => "ruby_sess.", :session_path => "/" } 40 40 41 41 def initialize(cgi, session_options = {}) … … 68 68 return @session unless @session.nil? 69 69 begin 70 @session = (@session_options == false ? {} : CGI::Session.new(@cgi, DEFAULT_SESSION_OPTIONS.merge(@session_options)))70 @session = (@session_options == false ? {} : CGI::Session.new(@cgi, session_options_with_string_keys)) 71 71 @session["__valid_session"] 72 72 return @session … … 94 94 def new_session 95 95 CGI::Session.new(@cgi, DEFAULT_SESSION_OPTIONS.merge(@session_options).merge("new_session" => true)) 96 end 97 98 def session_options_with_string_keys 99 DEFAULT_SESSION_OPTIONS.merge(@session_options).inject({}) { |options, pair| options[pair.first.to_s] = pair.last; options } 96 100 end 97 101 end trunk/actionpack/lib/action_controller/cookies.rb
r110 r117 42 42 def []=(name, options) 43 43 if options.is_a?(Hash) 44 options .each { |key, value| options[key.to_s] = value}44 options = options.inject({}) { |options, pair| options[pair.first.to_s] = pair.last; options } 45 45 options["name"] = name.to_s 46 46 else