Sha256: 21839e2df4e73890f66f9493751b568b94342a511441f6accc193cabed776c00

Contents?: true

Size: 371 Bytes

Versions: 96

Compression:

Stored size: 371 Bytes

Contents

class Promo < Noodall::Component
  key :title, String
  key :link, String
  key :description, String
  key :target, String

  key :asset_id, ObjectId

  belongs_to :asset
  before_save :log_asset_use

  allowed_positions :main, :small, :wide

private

  def log_asset_use
    unless asset.nil?
      asset.log_usage(_root_document.id, self.class.name)
    end
  end

end

Version data entries

96 entries across 96 versions & 1 rubygems

Version Path
noodall-ui-0.5.15 spec/dummy/app/models/promo.rb
noodall-ui-0.5.14 spec/dummy/app/models/promo.rb
noodall-ui-0.5.13 spec/dummy/app/models/promo.rb
noodall-ui-0.5.12 spec/dummy/app/models/promo.rb
noodall-ui-0.5.11 spec/dummy/app/models/promo.rb
noodall-ui-0.4.11 demo/models/promo.rb
noodall-ui-0.4.10 demo/models/promo.rb
noodall-ui-0.5.10 spec/dummy/app/models/promo.rb
noodall-ui-0.5.9 spec/dummy/app/models/promo.rb
noodall-ui-0.4.9 demo/models/promo.rb
noodall-ui-0.5.8 spec/dummy/app/models/promo.rb
noodall-ui-0.4.8 demo/models/promo.rb
noodall-ui-0.4.7 demo/models/promo.rb
noodall-ui-0.5.7 spec/dummy/app/models/promo.rb
noodall-ui-0.5.6 spec/dummy/app/models/promo.rb
noodall-ui-0.5.5 spec/dummy/app/models/promo.rb
noodall-ui-0.5.4 spec/dummy/app/models/promo.rb
noodall-ui-0.5.3 spec/dummy/app/models/promo.rb
noodall-ui-0.5.2 spec/dummy/app/models/promo.rb
noodall-ui-0.5.1 spec/dummy/app/models/promo.rb