Changeset 2151
- Timestamp:
- 09/08/05 11:28:54 (3 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/cgi_process.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r2149 r2151 1 1 *SVN* 2 3 * Performance improvements to CGI methods. Closes #1980 [Skaes] 2 4 3 5 * Added :post option to UrlHelper#link_to that makes it possible to do POST requests through normal ahref links using Javascript trunk/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb
r1905 r2151 18 18 v = CGI.unescape(v) if v 19 19 20 keys = split_key(k) 21 last_key = keys.pop 22 last_key = keys.pop if (use_array = last_key.empty?) 23 parent = keys.inject(parsed_params) {|h, k| h[k] ||= {}} 24 25 if use_array then (parent[last_key] ||= []) << v 26 else parent[last_key] = v 20 unless k.include?(?[) 21 parsed_params[k] = v 22 else 23 keys = split_key(k) 24 last_key = keys.pop 25 last_key = keys.pop if (use_array = last_key.empty?) 26 parent = keys.inject(parsed_params) {|h, k| h[k] ||= {}} 27 28 if use_array then (parent[last_key] ||= []) << v 29 else parent[last_key] = v 30 end 27 31 end 28 32 } trunk/actionpack/lib/action_controller/cgi_process.rb
r1905 r2151 126 126 private 127 127 def new_session 128 CGI::Session.new(@cgi, session_options_with_string_keys. merge("new_session" => true))128 CGI::Session.new(@cgi, session_options_with_string_keys.update("new_session" => true)) 129 129 end 130 130 131 131 def session_options_with_string_keys 132 DEFAULT_SESSION_OPTIONS.merge(@session_options).inject({}) { |options, pair| options[pair.first.to_s] = pair.last; options }132 DEFAULT_SESSION_OPTIONS.merge(@session_options).inject({}) { |options, (k,v)| options[k.to_s] = v; options } 133 133 end 134 134 end