Module: SpreeMobility::CoreExt::Spree::PromotionDecorator
- Defined in:
- lib/spree_mobility/core_ext/spree/promotion_decorator.rb
Class Method Summary collapse
Class Method Details
.prepended(base) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/spree_mobility/core_ext/spree/promotion_decorator.rb', line 2 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 |