diff options
author | Ryan Bigg <radarlistener@gmail.com> | 2008-10-18 17:43:38 +1030 |
---|---|---|
committer | Ryan Bigg <radarlistener@gmail.com> | 2008-10-18 17:43:38 +1030 |
commit | 2139a1b6812be7ca86de2df52e9776a2be4a2bf7 (patch) | |
tree | 3131e29d3582b8aa1ba1c68710f327ce2f22aa1d /actionpack/lib/action_controller | |
parent | 09b7e351316cb87a815678241fc90af549327cf3 (diff) | |
parent | 095cafbcd7fbae3baa845b23b93c8dca93b442f8 (diff) | |
download | rails-2139a1b6812be7ca86de2df52e9776a2be4a2bf7.tar.gz rails-2139a1b6812be7ca86de2df52e9776a2be4a2bf7.tar.bz2 rails-2139a1b6812be7ca86de2df52e9776a2be4a2bf7.zip |
Merge branch 'master' of git@github.com:lifo/docrails
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/base.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_controller/routing/builder.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 413f6d48e5..3ede681253 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -969,7 +969,9 @@ module ActionController #:nodoc: # If-Modified-Since request header is <= last modified. def last_modified!(utc_time) response.last_modified= utc_time - head(:not_modified) if response.last_modified == request.if_modified_since + if request.if_modified_since && request.if_modified_since <= utc_time + head(:not_modified) + end end # Sets the ETag response header. Returns 304 Not Modified if the diff --git a/actionpack/lib/action_controller/routing/builder.rb b/actionpack/lib/action_controller/routing/builder.rb index 5704d9d01a..7b888fa8d2 100644 --- a/actionpack/lib/action_controller/routing/builder.rb +++ b/actionpack/lib/action_controller/routing/builder.rb @@ -60,12 +60,10 @@ module ActionController # segments are passed alongside in order to distinguish between default values # and requirements. def divide_route_options(segments, options) - options = options.dup + options = options.except(:path_prefix, :name_prefix) if options[:namespace] options[:controller] = "#{options.delete(:namespace).sub(/\/$/, '')}/#{options[:controller]}" - options.delete(:path_prefix) - options.delete(:name_prefix) end requirements = (options.delete(:requirements) || {}).dup diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 6a39039504..4fc60f0697 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -134,6 +134,9 @@ module ActionController @controller = self.class.controller_class.new @controller.request = @request = TestRequest.new @response = TestResponse.new + + @controller.params = {} + @controller.send(:initialize_current_url) end # Cause the action to be rescued according to the regular rules for rescue_action when the visitor is not local |