Module: SpreeMobility::CoreExt::Spree::ShippingMethodDecorator

Defined in:
lib/spree_mobility/core_ext/spree/shipping_method_decorator.rb

Class Method Summary collapse

Class Method Details

.prepended(base) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/spree_mobility/core_ext/spree/shipping_method_decorator.rb', line 2

def self.prepended(base)
  base.include SpreeMobility::Translatable
  SpreeMobility.translates_for base, :name
  
  base.translation_class.class_eval do
    validates :name, presence: true
  end
end