Sha256: d14eb7f9527a0c4cd6632daafb3484d826b706387cf96c21960c1ce8e3c7ceb9

Contents?: true

Size: 387 Bytes

Versions: 2

Compression:

Stored size: 387 Bytes

Contents

module Tekeya
  module Entity
    module Group
      extend ActiveSupport::Concern
      include Entity

      included do
        belongs_to :owner, polymorphic: true

        validates_presence_of :owner
      end

      def is_tekeya_group?
        return true
      end

      def members(type = nil)
        tekeya_relations_of(self, :joins, type, true)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tekeya-0.0.10 lib/tekeya/entity/group.rb
tekeya-0.0.9 lib/tekeya/entity/group.rb