title: Rails process_without methods
body: <p>I have a problem running <a href="https://github.com/radiant/radiant/wiki/mailer-extension" rel="nofollow noreferrer">radiant mailer extension</a> <code>SystemStackError in SiteController#show_page</code> on any page, which doesn't contain mailer functionality. 
  I've found, that that there is a module that casus issues: </p>
  
  <pre><code>Module MailerProcess
    include RecaptchaMailer
  
    def self.included(base)
      base.class_eval {
        alias_method_chain :process, :mailer
        attr_accessor :last_mail
      }
    end
  
    def process_with_mailer(request, response)
      # If configured to do so, receive and process the mailer POST
      if Radiant::Config['mailer.post_to_page?'] &amp;&amp; ... 
         # here process_mail from RecaptchaMailer called - works fine 
      end
      process_without_mailer(request, response)
    end
  end
  </code></pre>
  
  <p>And here <code>process_without_mailer</code> is what completely confuses me - there is no such definition. THis method actually causes lots of "SHOW TABLES" in logs and finally the exception. 
  This method i suspect is some more or less Rails part, bcause there are the same calls e.g. in <code>actionpack-2.3.18/lib/action_controller/filters.rb</code> (<code>process_without_filters</code>), <code>rails-4.0.0/guides/source/active_support_core_extensions.md</code> (<code>process_without_stringified_params</code>) - those methods also don't have any definitions.</p>
  
  <p>So, there are two questions: </p>
  
  <ol>
  <li>why <code>process_with_mailer</code> is called during <strong>any</strong> page load?</li>
  <li>what's the magic behind <code>process_without_mailer</code>? </li>
  </ol>
  
  <p><strong>UPD:</strong> </p>
  
  <p>ok, commenting out method <code>process_with_mailer</code> gives error during startup:</p>
  
  <pre><code>/home/sab/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-2.3.18/lib/active_support/core_ext/module/aliasing.rb:34:in `alias_method': undefined method `process_with_mailer' for class `Page' (NameError)
          from /home/sab/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-2.3.18/lib/active_support/core_ext/module/aliasing.rb:34:in `alias_method_chain'
          from /home/sab/_work/radiant-cms/vendor/extensions/mailer/lib/mailer_process.rb:6:in `block in included'
          from /home/sab/_work/radiant-cms/vendor/extensions/mailer/lib/mailer_process.rb:5:in `class_eval'
  </code></pre>
  
  <p>So, probably <code>alias_method_chain</code> causes calling method every page load, but mechanics is unclear to me. I've found some <a href="http://apidock.com/rails/ActiveSupport/CoreExtensions/Module/alias_method_chain" rel="nofollow noreferrer">ActiveSuppor</a> doc.</p>
  
  <p><strong>UPD2</strong>
  well i ended up with</p>
  
  <ol>
  <li>Reading <a href="https://stackoverflow.com/questions/3695839/ruby-on-rails-alias-method-chain-what-exactly-does-it-do">Ruby on Rails: alias_method_chain, what exactly does it do?</a></li>
  <li>commenting out <code>process_with_mailer</code> and <code>alias_method_chain</code>. on that configuration it sends emails, so that's acceptable. i still would like to know, what was author's general idea.</li>
  </ol>