diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-28 07:57:26 +0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-28 11:38:35 +0800 |
commit | 71acc2737aa346ee57f9fc21252a508ae83367a4 (patch) | |
tree | ddb12b7813d20b4003c874604620d0aef7ace31a /actionpack/lib/action_controller/caching/pages.rb | |
parent | b7934afe326f8bba9cdcacdfac93062dff155efe (diff) | |
download | rails-71acc2737aa346ee57f9fc21252a508ae83367a4.tar.gz rails-71acc2737aa346ee57f9fc21252a508ae83367a4.tar.bz2 rails-71acc2737aa346ee57f9fc21252a508ae83367a4.zip |
Move uri parser to AS as URI.parser method to reuse it in AP and ARes.
Diffstat (limited to 'actionpack/lib/action_controller/caching/pages.rb')
-rw-r--r-- | actionpack/lib/action_controller/caching/pages.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/actionpack/lib/action_controller/caching/pages.rb b/actionpack/lib/action_controller/caching/pages.rb index f0e00718ac..df4d500069 100644 --- a/actionpack/lib/action_controller/caching/pages.rb +++ b/actionpack/lib/action_controller/caching/pages.rb @@ -57,8 +57,6 @@ module ActionController #:nodoc: end module ClassMethods - include UriParser - # Expires the page that was cached with the +path+ as a key. Example: # expire_page "/lists/show" def expire_page(path) @@ -100,7 +98,7 @@ module ActionController #:nodoc: private def page_cache_file(path) - name = (path.empty? || path == "/") ? "/index" : uri_parser.unescape(path.chomp('/')) + name = (path.empty? || path == "/") ? "/index" : URI.parser.unescape(path.chomp('/')) name << page_cache_extension unless (name.split('/').last || name).include? '.' return name end @@ -112,10 +110,6 @@ module ActionController #:nodoc: def instrument_page_cache(name, path) ActiveSupport::Notifications.instrument("#{name}.action_controller", :path => path){ yield } end - - def uri_parser - @uri_parser ||= URI.const_defined?(:Parser) ? URI::Parser.new : URI - end end # Expires the page that was cached with the +options+ as a key. Example: |