Simplify code checking whether to enable a locale
This commit is contained in:
@@ -4,6 +4,10 @@ module Globalizable
|
||||
included do
|
||||
globalize_accessors
|
||||
accepts_nested_attributes_for :translations, allow_destroy: true
|
||||
|
||||
def locales_not_marked_for_destruction
|
||||
translations.reject(&:_destroy).map(&:locale)
|
||||
end
|
||||
end
|
||||
|
||||
class_methods do
|
||||
|
||||
Reference in New Issue
Block a user