Sha256: 0e0b919ab078747f546314df803a65af6ede58d4547e9080317b70c3336b9ff6

Contents?: true

Size: 714 Bytes

Versions: 2

Compression:

Stored size: 714 Bytes

Contents

require 'active_support/concern'

module Canmoia
  module Work
    extend ActiveSupport::Concern

    included do
      include Order

      # Fields

      # Relations
      belongs_to :responsible, :class_name => "::User"

      # States Notifications
      notify :responsible
    end

    module CalculationMethods
      def total
        @total ||= items.sum(&:value)
      end
    end

    # - on :open   , close: :reviewing, cancel: :canceled, notify: :responsible
    # V on :review, reject: :rejected, accept: :accepted
    # - on :accept, notify: :buyer
    # - on :reject, notify: :buyer
    # - on :cancel, notify: [:buyer, via: :email] }
    # - on :finish, notify: [:buyer, via: :email] }

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
canmoia-0.0.2 lib/canmoia/concerns/work.rb~
canmoia-0.0.1 lib/canmoia/concerns/work.rb~