title: module not loading in the controller (undefined_method error)
body: <p>before applying the <code>BeforeOrAfter</code> module in my view, trying to get it to work in the console. getting the <code>NoMethodError: undefined method</code>before_or_after' for #` error: </p>
  
  <pre><code>&gt; s = Artist.find(1)
  &gt; s.events.each do |event|
  &gt;     before_or_after(event.date)
  &gt; end
  </code></pre>
  
  <p>I chose to create a new modules subdirectory, app/modules/before_or_after.rb:</p>
  
  <pre><code>module BeforeOrAfter
    attr_reader :past
    attr_reader :future
  
    require "date"
    def initialize
      @datetime = DateTime.new
      @future = []
      @past = []
    end
  
    def before_or_after(datetime)
      if datetime &lt; DateTime.now
        @past &lt;&lt; datetime
      else
        @future &lt;&lt; datetime
      end
    end
  end
  </code></pre>
  
  <p>including it in application_controller.rb because all my controllers will be using it:</p>
  
  <pre><code>class ApplicationController &lt; ActionController::Base
    include BeforeOrAfter
  </code></pre>