title: Calling base class method from overloaded method in sub-class
body: <p>Perhaps I am just not using the correct terminology for Ruby (and if I am please correct me), but Google just isn't helping me on this one.</p>
  
  <p>What I have is a class (call it OrderController) that extends another class (call it BaseStoreController). In the BaseStoreController I have defined a <code>before_filter</code> that is used throughout my site, with the small except of my OrderController. In this very particular situation I needed to define a custom <code>before_filter</code> that needs to do some additional logic and then call the <code>before_filter</code> defined in my BaseStoreController.</p>
  
  <p>What I do not know is how to do this.</p>
  
  <p>Here is what I've tried, but it appears that the 'super' keyword isn't what I was expecting it to be:</p>
  
  <pre><code>class BaseStoreController &lt; ActionController::Base
      before_filter :authorize
  
      protected
          def authorize
              #common authroization logic here
          end
   end
  </code></pre>
  
  <p>and</p>
  
  <pre><code>class OrderController &lt; BaseStoreController
      before_filter :authorize
  
      protected
          def authorize
              #additional authroization logic here
              super.authorize
          end
   end
  </code></pre>
  
  <p>The end result of my code is that the authorize method in the OrderController is failing with the following error:</p>
  
  <pre>
  You have a nil object when you didn't expect it!
  The error occurred while evaluating nil.authorize
  </pre>