Sha256: 3e9d794fbb1b88d780b21a660a27775a0f37ca4442eba0640f66ef7db720b5c1
Contents?: true
Size: 553 Bytes
Versions: 14
Compression:
Stored size: 553 Bytes
Contents
module Rivendell::Import::Tasking module Destination def destination read_attribute(:destination) or write_attribute(:destination, calculate_destination) end def reset_destination! write_attribute :destination, nil end def self.included(base) base.class_eval do before_save :destination, :on => :create end end def calculate_destination if cart.number "Cart #{cart.number}" elsif cart.group "Cart in group #{cart.group}" end end end end
Version data entries
14 entries across 14 versions & 1 rubygems