Sha256: e5186692f7b827371bf198f7cec7771a6e802d3a5a67c665978793a8897ca07d

Contents?: true

Size: 213 Bytes

Versions: 2

Compression:

Stored size: 213 Bytes

Contents

class Sprangular.Adjustment
  init: ->
    @amount = Number(@amount)

  isPromo: ->
    @source_type == 'Spree::PromotionAction'

  # label == 'Promotion (couponName)'
  promoCode: ->
    @label.split(/[()]+/)[1]

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sprangular-0.1.0 app/assets/javascripts/sprangular/models/adjustment.coffee
sprangular-0.0.1 app/assets/javascripts/sprangular/models/adjustment.coffee