lib/reviewed/product.rb in reviewed-0.2.2 vs lib/reviewed/product.rb in reviewed-0.4.0

- old
+ new

@@ -1,21 +1,12 @@ require 'reviewed/attachment' module Reviewed class Product < Base - has_many :attachments + + has_attachments has_many :manufacturer_specs has_many :awards has_one :brand - def attachments(tag=nil) - if tag.present? - @attributes.attachments.select do |attachment| - attachment_tags = attachment.tags || [] - attachment_tags.map(&:downcase).include?(tag.downcase) - end - else - @attributes.attachments - end - end end end