Sha256: a5cd1d464c9fb0bc563014a404fd11e7016bda6425ef3ea5ca69a61406a0b422

Contents?: true

Size: 364 Bytes

Versions: 5

Compression:

Stored size: 364 Bytes

Contents

module SpreeMobility::CoreExt::Spree::PromotionDecorator
  def self.prepended(base)
    base.include SpreeMobility::Translatable
    SpreeMobility.translates_for base, :name, :description
    
    base.translation_class.class_eval do
      validates :name, presence: true
      validates :description, length: { maximum: 255 }, allow_blank: true
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spree_mobility-1.4.0 lib/spree_mobility/core_ext/spree/promotion_decorator.rb
spree_mobility-1.3.0 lib/spree_mobility/core_ext/spree/promotion_decorator.rb
spree_mobility-1.2.0 lib/spree_mobility/core_ext/spree/promotion_decorator.rb
spree_mobility-1.1.0 lib/spree_mobility/core_ext/spree/promotion_decorator.rb
spree_mobility-1.0.0 lib/spree_mobility/core_ext/spree/promotion_decorator.rb