title: Override method (monkey patch?) on rails core
body: <p>On this file:</p>
  
  <pre><code>...gems/actionpack-2.3.18/lib/action_controller/rescue.rb
  </code></pre>
  
  <p>Exists a method called <code>local_request?</code> inside <code>module Rescue</code>, that is contained in <code>module ActionController</code>, so its like this:</p>
  
  <pre><code>module ActionController
      ...
      module Rescue
         ...
         protected
         ...
         # True if the request came from localhost, 127.0.0.1. Override this
         # method if you wish to redefine the meaning of a local request to
         # include remote IP addresses or other criteria.
         def local_request?
           ....
  </code></pre>
  
  <p>I want to override that method in order to handle all requests as non-local, I tried with this (what I think is a monkey patch, not sure if the term is wrong)</p>
  
  <pre><code>module ActionController
    module Rescue
      protected
        def local_request? #:doc:
          false
        end
    end
  end
  </code></pre>
  
  <p>It seems to work (that method return false), but when making a request I receive an error: </p>
  
  <pre><code>undefined method `call_with_exception' for ApplicationController:Class
  </code></pre>
  
  <p>That method exists in </p>
  
  <p>module ActionController > module Rescue > module ClassMethods</p>
  
  <p>1) If i'm overriding only one method why that got undefined? im deleting the other methods/modules inside the one i'm modifying?</p>
  
  <p>2) How to and whats the right way to do this?</p>