Sha256: 7f5e5bedd9826e50fbb550e34cbf2a1a0c56048792c105353df6107415566bdb

Contents?: true

Size: 328 Bytes

Versions: 1

Compression:

Stored size: 328 Bytes

Contents

module Transit
  module Model
    
    module Topics
      extend ActiveSupport::Concern
      
      included do
        has_and_belongs_to_many :topics, inverse_of: :posts, autosave: true
        Topic.send(:has_and_belongs_to_many, :"#{self.name.pluralize.underscore}", inverse_of: :topics)
      end  
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
transit-0.0.2 lib/transit/model/topics.rb