Refactor globalize models code using a concern

I've chosen the name "Globalizable" because "Translatable" already
existed.
This commit is contained in:
Javi Martín
2018-10-11 02:29:08 +02:00
parent 3b5a12b0ab
commit 2ab49a1832
13 changed files with 20 additions and 24 deletions

View File

@@ -0,0 +1,8 @@
module Globalizable
extend ActiveSupport::Concern
included do
globalize_accessors
accepts_nested_attributes_for :translations, allow_destroy: true
end
end