title: How to use 'before_action' in a module
body: <p>I would like to use 'before_action' in a module.</p>
  
  <p>Unfortunately, I couldn't get it work.</p>
  
  <p>I was googleing, but everything I found couldn't solve the problem.</p>
  
  <p>My module file looks like the following:</p>
  
  <pre><code>module ShowController
    include SimpleController
    #before_action :set_object, only: [:show]
  
    def show
     set_object
    end
  end
  </code></pre>
  
  <p>I would like to use the outcommented before_action line instead of the show method.</p>
  
  <p>Therefore, I was trying to include the following modules:</p>
  
  <pre><code>  include AbstractController::Callbacks
    include ActiveSupport::Callbacks
    include ActiveSupport::Concern
    include ActiveSupport
  </code></pre>
  
  <p>Additionally, I tried to "require 'active_support/all'" or the core_ext.</p>
  
  <p>The error_message I receive is:</p>
  
  <pre><code> undefined method `class_attribute' for SimpleController::ShowController:Module
  </code></pre>
  
  <p>Finally, nothing worked out and I didn't find a solution.</p>