lib/app/models/magic_locales/association.rb in magic_locales-0.0.19 vs lib/app/models/magic_locales/association.rb in magic_locales-0.0.20

- old
+ new

@@ -16,11 +16,11 @@ -> { where(level: 'native', default: true) }, as: :owner, class_name: "MagicLocales::Language", dependent: :destroy - accepts_nested_attributes_for :language, allow_destroy: true, reject_if: :all_blank + accepts_nested_attributes_for :language, allow_destroy: true, reject_if: proc { |atts| atts['locale_id'].blank? } end def has_languages # send :include, InstanceMethods @@ -41,10 +41,10 @@ -> { where(level: 'native') }, as: :owner, class_name: "MagicLocales::Language", dependent: :destroy - accepts_nested_attributes_for :spoken_languages, allow_destroy: true, reject_if: :all_blank + accepts_nested_attributes_for :spoken_languages, allow_destroy: true, reject_if: proc { |atts| atts['locale_id'].blank? } end end #> ClassMethods