lib/mongoid/kms.rb in mongoid-kms-0.0.18 vs lib/mongoid/kms.rb in mongoid-kms-0.0.19
- old
+ new
@@ -72,10 +72,10 @@
end
end
end
def kms_context_value_changed?(field_name)
- self.class.kms_context_array(self, field_name).find { |f| self.respond_to?(f) && self.send("#{f}_changed?") }
+ self.class.kms_context_array(self, field_name).find { |f| self.respond_to?(f) && self.respond_to?("#{f}_changed?") && self.send("#{f}_changed?") }
end
# Class methods
module ClassMethods
def kms_field_map