Sha256: 1303034bdd12aece7e7a128b0dccbbc9efceb2aea93b247ca6c2ba3689dd89bb

Contents?: true

Size: 455 Bytes

Versions: 3

Compression:

Stored size: 455 Bytes

Contents

class Post < ActiveRecord::Base
  has_many :author_posts
  has_many :authors, through: :author_posts
  has_and_belongs_to_many :tags

  has_similar_models :authors
  has_similar_models :tags, as: :similar_posts_by_tag
  has_similar_models :authors, :tags, as: :similar_posts_by_author_and_tag
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

3 entries across 3 versions & 1 rubygems

Version Path
similar_models-0.2.1 spec/support/models.rb
similar_models-0.2.0 spec/support/models.rb
similar_models-0.1.0 spec/support/models.rb