diff options
-rw-r--r-- | actionpack/lib/action_dispatch/http/request.rb | 3 | ||||
-rw-r--r-- | activerecord/lib/active_record/integration.rb | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index 535ed9373b..99b81c898f 100644 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -299,7 +299,6 @@ module ActionDispatch LOCALHOST =~ remote_addr && LOCALHOST =~ remote_ip end - # Extracted into ActionDispatch::Request::Utils.deep_munge, but kept here for backwards compatibility. def deep_munge(hash) ActiveSupport::Deprecation.warn( @@ -309,13 +308,11 @@ module ActionDispatch Utils.deep_munge(hash) end - protected def parse_query(qs) Utils.deep_munge(super) end - private def check_method(name) HTTP_METHOD_LOOKUP[name] || raise(ActionController::UnknownHttpMethod, "#{name}, accepted HTTP methods are #{HTTP_METHODS.to_sentence(:locale => :en)}") diff --git a/activerecord/lib/active_record/integration.rb b/activerecord/lib/active_record/integration.rb index 6449789fe4..2b275a2ed9 100644 --- a/activerecord/lib/active_record/integration.rb +++ b/activerecord/lib/active_record/integration.rb @@ -45,7 +45,7 @@ module ActiveRecord # Product.new.cache_key # => "products/new" # Product.find(5).cache_key # => "products/5" (updated_at not available) # Person.find(5).cache_key # => "people/5-20071224150000" (updated_at available) - # + # # You can also pass a list of named timestamps, and the newest in the list will be # used to generate the key: # @@ -56,7 +56,7 @@ module ActiveRecord "#{self.class.model_name.cache_key}/new" when timestamp_names.any? timestamps = timestamp_names.collect { |method| send(method) }.compact - "#{self.class.model_name.cache_key}/#{id}-#{timestamps.max.utc.to_s(:number)}" + "#{self.class.model_name.cache_key}/#{id}-#{timestamps.max.utc.to_s(:number)}" when timestamp = max_updated_column_timestamp timestamp = timestamp.utc.to_s(cache_timestamp_format) "#{self.class.model_name.cache_key}/#{id}-#{timestamp}" |