title: Making a method available to all models
body: <pre><code>Rails 4.2.1
  Ruby 2.1.5
  </code></pre>
  
  <p>In app/models/conerns/extras.rb, I have the following:</p>
  
  <pre><code>module Extras
    extend ActiveSupport::Concern
  
    def add_slug_to_self (slug_elements = '')
      return slug_elements if !slug_elements.kind_of?(Array)
      slug_base = ''
      slug_elements.each do |se|
        slug_base = slug_base + se.to_s.upcase
      end
      self.slug = Digest::SHA256.hexdigest slug_base
    end
  
  end
  </code></pre>
  
  <p>To use it from any of my models, I include extras.rb, and then call it from that particular model.</p>
  
  <p>Is there a way I can do this, without having to explicitly include the file in every model?</p>