Skip to content

Commit 11c50d2

Browse files
committed
Merge branch 'master' of git://github.com/ahmadsherif/activeadmin-globalize3
2 parents 4dbd1a9 + d418cf8 commit 11c50d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/active_admin/globalize3/active_record_extension.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ def active_admin_translates(*args, &block)
1717
translation_class.instance_eval &block
1818
end
1919

20-
unless translation_class.ancestors.include? ::ActiveModel::ForbiddenAttributesProtection
20+
unless translation_class.ancestors.map(&:to_s).include?('ActiveModel::ForbiddenAttributesProtection')
2121
translation_class.attr_accessible :locale
2222
translation_class.attr_accessible *args
2323
end
2424

25-
attr_accessible :translations_attributes unless ancestors.include? ::ActiveModel::ForbiddenAttributesProtection
25+
attr_accessible :translations_attributes unless ancestors.map(&:to_s).include?('ActiveModel::ForbiddenAttributesProtection')
2626
accepts_nested_attributes_for :translations, allow_destroy: true
2727

2828
include Methods

0 commit comments

Comments
 (0)