Refactor globalize models code using a concern
I've chosen the name "Globalizable" because "Translatable" already existed.
This commit is contained in:
8
app/models/concerns/globalizable.rb
Normal file
8
app/models/concerns/globalizable.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
module Globalizable
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
globalize_accessors
|
||||
accepts_nested_attributes_for :translations, allow_destroy: true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user