module MongoProfiler
  class ProfileGroup
    include Mongoid::Document
    include Mongoid::Timestamps

    field :name, type: String

    has_many :profiles

    index name: 1
  end
end

module MongoProfiler
  class ProfileGroup
    include Mongoid::Document
    include Mongoid::Timestamps

    field :name, type: String

    has_many :profiles, dependent: :delete

    index name: 1
  end
end

Delete related profiles when deleting groups
Delete related profiles when deleting groups
