Sha256: 61fcc8e242097a08d508d9047dcb440680b58895740ed3d2db1478f6ac7ae043

Contents?: true

Size: 445 Bytes

Versions: 1

Compression:

Stored size: 445 Bytes

Contents

class Spree::Download < ActiveRecord::Base
  belongs_to :download_category
  has_one :language
  has_many :download_products
  has_many :products, :through => :download_products

  validates_presence_of :name, :url, :download_category_id
  validates_numericality_of :download_category_id

  # Bepaalt of deze download relevant is voor het meegegeven product.
  def is_relevant_for_product?(product)
    self.products.include?(product)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_downloads-1.0.1 app/models/spree/download.rb