Sha256: 6ca8acde49d1722f61c46a3927f511db1468dd1e4afbee144bc14c555e182bd7

Contents?: true

Size: 446 Bytes

Versions: 1

Compression:

Stored size: 446 Bytes

Contents

class Post < ActiveRecord::Base
  has_most_related :authors
  has_most_related :tags, as: :most_related_by_tag
  has_most_related :authors, :tags, as: :most_related_by_author_or_tag

  has_and_belongs_to_many :tags
  has_many :author_posts
  has_many :authors, through: :author_posts
end

class Tag < ActiveRecord::Base
end

class Author < ActiveRecord::Base
end

class AuthorPost < ActiveRecord::Base
  belongs_to :author
  belongs_to :post
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
most_related-0.1.0 spec/support/models.rb