12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/spree_simple_product_translations.rb', line 12
def self.activate
Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c|
Rails.env.production? ? require(c) : load(c)
end
::Product.class_eval do
accepts_nested_attributes_for :translations
end
::Property.class_eval do
accepts_nested_attributes_for :translations
end
::Taxon.class_eval do
accepts_nested_attributes_for :translations
end
::OptionType.class_eval do
accepts_nested_attributes_for :translations
end
::OptionValue.class_eval do
accepts_nested_attributes_for :translations
end
end
|