Concerns
Are used to share functionality between files in one 'type' ('model', 'controller', ...).
Thus you have
/app
/controllers
/concerns
/models
/concerns
In concerns
you put modules which will be included inside classes. It is god practice to put some behaviour code. For example
/app
/models
/concerns
messageable.rb
project.rb
..
proposal.rb
Project model
class Project < ActiveRecord::Base
include Messageable
end
Proposal model
class Proposal < ActiveRecord::Base
include Messageable
end
inside app/models/concerns/messageable.rb
require 'active_record/concern'
module Messageable
extend ActiveSupport::Concern
# implement behaviour
module ClassMethods
# class methods for the behaviour
end
end