diff options
author | José Valim <jose.valim@gmail.com> | 2009-12-02 22:29:34 -0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-12-02 22:29:34 -0200 |
commit | 6e55b32e98fcaad82184d2e21ee611a3465e4b20 (patch) | |
tree | e316b8ca72f2bef50668c222400a159b36fbc090 /actionpack/lib/action_controller | |
parent | c2e97cb410d759f383d29920165abdbf4b70e019 (diff) | |
parent | 399909b11c094ab32542d300c72940b1b263b8e6 (diff) | |
download | rails-6e55b32e98fcaad82184d2e21ee611a3465e4b20.tar.gz rails-6e55b32e98fcaad82184d2e21ee611a3465e4b20.tar.bz2 rails-6e55b32e98fcaad82184d2e21ee611a3465e4b20.zip |
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/compatibility.rb | 5 | ||||
-rw-r--r-- | actionpack/lib/action_controller/metal/responder.rb | 11 |
2 files changed, 9 insertions, 7 deletions
diff --git a/actionpack/lib/action_controller/metal/compatibility.rb b/actionpack/lib/action_controller/metal/compatibility.rb index c251d79f4e..0c264fcd09 100644 --- a/actionpack/lib/action_controller/metal/compatibility.rb +++ b/actionpack/lib/action_controller/metal/compatibility.rb @@ -46,11 +46,8 @@ module ActionController cattr_accessor :use_accept_header self.use_accept_header = true - cattr_accessor :page_cache_directory self.page_cache_directory = defined?(Rails.public_path) ? Rails.public_path : "" - cattr_reader :cache_store - cattr_accessor :consider_all_requests_local self.consider_all_requests_local = true @@ -116,7 +113,7 @@ module ActionController details[:prefix] = nil if name =~ /\blayouts/ super end - + # Move this into a "don't run in production" module def _default_layout(details, require_layout = false) super diff --git a/actionpack/lib/action_controller/metal/responder.rb b/actionpack/lib/action_controller/metal/responder.rb index e8e88e7479..6c76c57839 100644 --- a/actionpack/lib/action_controller/metal/responder.rb +++ b/actionpack/lib/action_controller/metal/responder.rb @@ -102,9 +102,14 @@ module ActionController #:nodoc: # not defined, call to_format. # def self.call(*args) - responder = new(*args) - method = :"to_#{responder.format}" - responder.respond_to?(method) ? responder.send(method) : responder.to_format + new(*args).respond + end + + # Main entry point for responder responsible to dispatch to the proper format. + # + def respond + method = :"to_#{format}" + respond_to?(method) ? send(method) : to_format end # HTML format does not render the resource, it always attempt to render a |