Sha256: 5c1798ac547dc4af3b0168a1cf10960f45ff410bee76e1ce49c9b709f92ea524

Contents?: true

Size: 528 Bytes

Versions: 2

Compression:

Stored size: 528 Bytes

Contents

module Conversations
  module Models
    module Conversationalist
      def self.included(mod)
        mod.extend(ClassMethods)
      end
      
      module ClassMethods
        def has_conversations
          has_many :user_conversations, :class_name => "Conversations::UserConversation"
          has_many :conversations, :through => :user_conversations
          has_many :messages, :through => :conversations

          include InstanceMethods
        end
      end

      module InstanceMethods
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
conversations-0.0.2 lib/conversations/models/conversationalist.rb
conversations-0.0.1 lib/conversations/models/conversationalist.rb