Sha256: 5883a5f41e8ace4ed35f95c27abdca0802f68cd955edee3901b8f84fca5b253e

Contents?: true

Size: 435 Bytes

Versions: 44

Compression:

Stored size: 435 Bytes

Contents

class Order < ActiveRecord::Base

  serialize :args
  #
  # METHODS
  #
  def acknowledge
    Orders::AcknowledgeWorker.perform_async id
  end

  def acknowledged!
    update_attribute(:acknowledged, true)
  end

  def complete
    return if complete?

    update_attribute(:complete, true)
    Orders::CompleteWorker.perform_async id
  end

  def perform
    "orders/#{keyword}_worker".camelize.constantize.perform_async(id)
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
smartkiosk-client-0.2.1 app/models/order.rb
smartkiosk-client-0.2 app/models/order.rb
smartkiosk-client-0.1.19 app/models/order.rb
smartkiosk-client-0.1.18 app/models/order.rb
smartkiosk-client-0.1.17 app/models/order.rb
smartkiosk-client-0.1.16 app/models/order.rb
smartkiosk-client-0.1.15 app/models/order.rb
smartkiosk-client-0.1.14 app/models/order.rb
smartkiosk-client-0.1.13 app/models/order.rb
smartkiosk-client-0.1.12 app/models/order.rb
smartkiosk-client-0.1.11 app/models/order.rb
smartkiosk-client-0.1.10 app/models/order.rb
smartkiosk-client-0.1.9 app/models/order.rb
smartkiosk-client-0.1.8 app/models/order.rb
smartkiosk-client-0.1.7 app/models/order.rb
smartkiosk-client-0.1.6 app/models/order.rb
smartkiosk-client-0.1.5 app/models/order.rb
smartkiosk-client-0.1.4 app/models/order.rb
smartkiosk-client-0.1.3 app/models/order.rb
smartkiosk-client-0.1.2 app/models/order.rb