README.md in similar_models-0.1.0 vs README.md in similar_models-0.2.0
- old
+ new
@@ -1,10 +1,10 @@
# Similar Models
Adds a `similar_{model name plural}` method to an active record model, but can be set to any name using `as: {method name}`. It returns the most similar models of the same class based on associated models in common.
-The association(s) have to be many to many, so either habtm or 'has_many though'.
+The association(s) have to be many to many, so either [habtm](http://guides.rubyonrails.org/association_basics.html#the-has-and-belongs-to-many-association) or [has_many :through](http://guides.rubyonrails.org/association_basics.html#the-has-many-through-association).
## Installation
Add this line to your application's Gemfile:
@@ -26,11 +26,11 @@
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_tags
- has_similar_models :authors, :tags, as: :similar_posts_by_author_or_tag
+ 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