Sha256: 97d1af8eee473084217b0357707173b9677282190da3af7827556b28801723dc
Contents?: true
Size: 434 Bytes
Versions: 10
Compression:
Stored size: 434 Bytes
Contents
require 'reviewed/attachment' module Reviewed class Product < Base has_many :attachments has_many :manufacturer_specs 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
Version data entries
10 entries across 10 versions & 1 rubygems