Files
openfoodnetwork/app/models/enterprise_fee.rb
2013-08-12 11:05:00 +10:00

16 lines
383 B
Ruby

class EnterpriseFee < ActiveRecord::Base
belongs_to :enterprise
calculated_adjustments
attr_accessible :enterprise_id, :fee_type, :name, :calculator_type
FEE_TYPES = %w(packing transport admin sales)
validates_inclusion_of :fee_type, :in => FEE_TYPES
validates_presence_of :name
scope :for_enterprise, lambda { |enterprise| where(enterprise_id: enterprise) }
end