title: How can I create a concern in a Rails engine?
body: <p>I'm trying to create a concern inside an engine in order to add/override this functions in the main application which is going to mount this engine. The problem is that I have had problems including the concern in the engine module. It seems that Rails can't find it.</p>
  
  <p>This is my <code>post.rb</code> file in <code>app/models/blorgh/post.rb</code>: </p>
  
  <pre><code>module Blorgh
    class Post &lt; ActiveRecord::Base
      include Blorgh::Concerns::Models::Post
    end
  end
  </code></pre>
  
  <p>And this is my <code>post.rb</code> concern in <code>lib/concerns/models/post.rb</code>:</p>
  
  <p>require 'active_support/concern'</p>
  
  <pre><code>module Concerns::Models::Post
    extend ActiveSupport::Concern
  
    # 'included do' causes the included code to be evaluated in the
    # conext where it is included (post.rb), rather than be 
    # executed in the module's context (blorgh/concerns/models/post).
    included do
      attr_accessible :author_name, :title, :text
      attr_accessor :author_name
      belongs_to :author, class_name: Blorgh.user_class
      has_many :comments
  
      before_save :set_author
  
      private
      def set_author
        self.author = User.find_or_create_by_name(author_name)
      end
    end
  
    def summary
      "#{title}"
    end
  
    module ClassMethods
      def some_class_method
        'some class method string'
      end
    end
  end
  </code></pre>
  
  <p>When I run the test/dummy, I got the this error: uninitialized constant Blorgh::Concerns</p>
  
  <p>This is my blorgh.gemspec:</p>
  
  <pre><code>$:.push File.expand_path("../lib", __FILE__)
  
  # Maintain your gem's version:
  require "blorgh/version"
  
  
  # Describe your gem and declare its dependencies:
  Gem::Specification.new do |s|
    s.name        = "blorgh"
    s.version     = Blorgh::VERSION
    s.authors     = ["***"]
    s.email       = ["***"]
    s.homepage    = "***"
    s.summary     = "Engine test."
    s.description = "Description of Blorgh."
  
    s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"]
    s.test_files = Dir["test/**/*"]
  
    s.add_dependency "rails", "~&gt; 3.2.8"
    s.add_dependency "jquery-rails"
  
    s.add_development_dependency "sqlite3"
  end
  </code></pre>
  
  <p>Can someone help me with this?</p>