Files
spree_digital/app/models/spree/digital.rb
2012-05-14 14:56:38 +02:00

13 lines
385 B
Ruby

module Spree
class Digital < ActiveRecord::Base
belongs_to :variant
has_many :digital_links, :dependent => :destroy
has_attached_file :attachment, :path => ":rails_root/private/digitals/:id/:basename.:extension"
# TODO: Limit the attachment to one single file. Paperclip supports many by default :/
attr_accessible :variant_id, :attachment
end
end