lib/reviewed/article.rb in reviewed-0.2.1 vs lib/reviewed/article.rb in reviewed-0.2.2
- old
+ new
@@ -7,9 +7,10 @@
class Article < Base
has_many :pages
has_many :products
has_many :attachments
has_many :deals
+ has_many :related_articles, class_name: "Reviewed::Article"
def find_page(slug)
pages.find { |page| page.slug.match(/#{slug}/i) }
end