Module: SpreeMobility::CoreExt::Spree::PaymentMethodDecorator

Defined in:
lib/spree_mobility/core_ext/spree/payment_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/payment_method_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
  end
end