diff options
author | José Valim <jose.valim@gmail.com> | 2012-01-17 12:00:05 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-01-17 12:00:05 -0800 |
commit | ba154bd76fb481d9faca123e988924bd864c0318 (patch) | |
tree | 89cb9542a0717e52477e6c0ae08fd703ce80dd6d /actionpack/lib/action_controller/metal/compatibility.rb | |
parent | 422958f17cbe1b6009313b7acd01cc11aacec3d7 (diff) | |
parent | 96a817fb2c5ca32c69469a9d2dc13630d8fa5e8a (diff) | |
download | rails-ba154bd76fb481d9faca123e988924bd864c0318.tar.gz rails-ba154bd76fb481d9faca123e988924bd864c0318.tar.bz2 rails-ba154bd76fb481d9faca123e988924bd864c0318.zip |
Merge pull request #4497 from carlosantoniodasilva/action-controller-refactor
Action controller refactor - remove Compatibility module
Diffstat (limited to 'actionpack/lib/action_controller/metal/compatibility.rb')
-rw-r--r-- | actionpack/lib/action_controller/metal/compatibility.rb | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/actionpack/lib/action_controller/metal/compatibility.rb b/actionpack/lib/action_controller/metal/compatibility.rb deleted file mode 100644 index 43719d5808..0000000000 --- a/actionpack/lib/action_controller/metal/compatibility.rb +++ /dev/null @@ -1,58 +0,0 @@ -module ActionController - module Compatibility - extend ActiveSupport::Concern - - class ::ActionController::ActionControllerError < StandardError #:nodoc: - end - - # Temporary hax - included do - ::ActionController::UnknownAction = ::AbstractController::ActionNotFound - ::ActionController::DoubleRenderError = ::AbstractController::DoubleRenderError - - # ROUTES TODO: This should be handled by a middleware and route generation - # should be able to handle SCRIPT_NAME - self.config.relative_url_root = ENV['RAILS_RELATIVE_URL_ROOT'] - - class << self - delegate :default_charset=, :to => "ActionDispatch::Response" - end - - self.protected_instance_variables = [ - :@_status, :@_headers, :@_params, :@_env, :@_response, :@_request, - :@_view_runtime, :@_stream, :@_url_options, :@_action_has_layout - ] - - def rescue_action(env) - raise env["action_dispatch.rescue.exception"] - end - end - - # For old tests - def initialize_template_class(*) end - def assign_shortcuts(*) end - - def _normalize_options(options) - options[:text] = nil if options.delete(:nothing) == true - options[:text] = " " if options.key?(:text) && options[:text].nil? - super - end - - def render_to_body(options) - options[:template].sub!(/^\//, '') if options.key?(:template) - 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 performed? - response_body - end - end -end |