Module: SpreeMobility::CoreExt::Spree::OptionValueDecorator
- Defined in:
- lib/spree_mobility/core_ext/spree/option_value_decorator.rb
Defined Under Namespace
Modules: TranslationMethods
Class Method Summary collapse
Class Method Details
.prepended(base) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/spree_mobility/core_ext/spree/option_value_decorator.rb', line 19 def self.prepended(base) base.include SpreeMobility::Translatable SpreeMobility.translates_for base, :name, :presentation base.translation_class.class_eval do include TranslationMethods validate :name_uniqueness_validation validates :name, presence: true validates :presentation, presence: true end end |