diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-18 11:54:51 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-18 11:54:51 -0700 |
commit | cf6e025a4538e488ed35f61f1f7f3498833a34e6 (patch) | |
tree | 6a28d5beac35e74a33243668baf7a9a60edf6724 /actionpack/lib/action_controller/new_base/compatibility.rb | |
parent | 628110d7eeb446fee7f9e043f113c083d24883c1 (diff) | |
parent | 195fadbfd31294d43634afb7bbf4f0ffc86b470a (diff) | |
download | rails-cf6e025a4538e488ed35f61f1f7f3498833a34e6.tar.gz rails-cf6e025a4538e488ed35f61f1f7f3498833a34e6.tar.bz2 rails-cf6e025a4538e488ed35f61f1f7f3498833a34e6.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'actionpack/lib/action_controller/new_base/compatibility.rb')
-rw-r--r-- | actionpack/lib/action_controller/new_base/compatibility.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/new_base/compatibility.rb b/actionpack/lib/action_controller/new_base/compatibility.rb index d17f498b60..0a283887b6 100644 --- a/actionpack/lib/action_controller/new_base/compatibility.rb +++ b/actionpack/lib/action_controller/new_base/compatibility.rb @@ -42,6 +42,17 @@ module ActionController # Controls the resource action separator cattr_accessor :resource_action_separator self.resource_action_separator = "/" + + 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 end module ClassMethods @@ -50,6 +61,11 @@ module ActionController def rescue_action(env) raise env["action_dispatch.rescue.exception"] end + + # Defines the storage option for cached fragments + def cache_store=(store_option) + @@cache_store = ActiveSupport::Cache.lookup_store(store_option) + end end def initialize(*) @@ -66,6 +82,14 @@ module ActionController super end + + def _handle_method_missing + method_missing(@_action_name.to_sym) + end + + def method_for_action(action_name) + super || (respond_to?(:method_missing) && "_handle_method_missing") + end def _layout_for_name(name) name &&= name.sub(%r{^/?layouts/}, '') |