Sha256: ffe9f3437867076d63004d5862f142fe97c66398eeb36021e227f2082c1fec3f

Contents?: true

Size: 301 Bytes

Versions: 25

Compression:

Stored size: 301 Bytes

Contents

class Promotion < ActiveRecord::Base
  belongs_to :provider

  scope :active, lambda{
    scoped.includes(:provider).where(Provider.arel_table[:fields_count].gt 0)
  }

  after_save do
    Terminal.modified_at = DateTime.now
  end

  after_destroy do
    Terminal.modified_at = DateTime.now
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

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