lib/reviewed/article.rb in reviewed-0.0.8 vs lib/reviewed/article.rb in reviewed-0.0.9

- old
+ new

@@ -6,9 +6,13 @@ class Article < Base has_many :pages has_many :products has_many :attachments + class << self + attr_accessor :branch + end + def find_page(slug) pages.find { |page| page.slug.match(/#{slug}/i) } end def primary_product