diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-08-10 15:49:33 -0700 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-08-11 15:03:53 -0700 |
commit | 4bf516e072f5279bdb462c6592e17b195fd9cf05 (patch) | |
tree | edc9d70aaf470c86feebf1d7420f2a8a3cafcdc6 /actionpack/lib/action_controller/metal/compatibility.rb | |
parent | 0adbeeb0c92c6de2e4a148e4b54d56cd4a325800 (diff) | |
download | rails-4bf516e072f5279bdb462c6592e17b195fd9cf05.tar.gz rails-4bf516e072f5279bdb462c6592e17b195fd9cf05.tar.bz2 rails-4bf516e072f5279bdb462c6592e17b195fd9cf05.zip |
More perf work:
* Move #set_cookie and #delete_cookie inline to optimize. These optimizations should
almost certainly be sent back upstream to Rack. The optimization involves using
an ivar for cookies instead of indexing into the headers each time.
* Was able to use a bare Hash for headers now that cookies have their own joining
semantics (some code assumed that the raw cookies were an Array).
* Cache blankness of body on body=
* Improve expand_cache_key for Arrays of a single element (common in our case)
* Use a simple layout condition check unless conditions are used
* Cache visible actions
* Lazily load the UrlRewriter
* Make etag an ivar that is set on prepare!
Diffstat (limited to 'actionpack/lib/action_controller/metal/compatibility.rb')
-rw-r--r-- | actionpack/lib/action_controller/metal/compatibility.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/metal/compatibility.rb b/actionpack/lib/action_controller/metal/compatibility.rb index a008b53d45..5b0165f0e7 100644 --- a/actionpack/lib/action_controller/metal/compatibility.rb +++ b/actionpack/lib/action_controller/metal/compatibility.rb @@ -102,11 +102,10 @@ module ActionController options[:template].sub!(/^\//, '') end - options[:text] = nil if options[:nothing] == true + options[:text] = nil if options.delete(:nothing) == true + options[:text] = " " if options.key?(:text) && options[:text].nil? - body = super - body = [' '] if body.blank? - body + super || " " end def _handle_method_missing |