lib/voltron/encryptable.rb in voltron-encrypt-0.1.9.1 vs lib/voltron/encryptable.rb in voltron-encrypt-0.1.9.2

- old
+ new

@@ -67,10 +67,11 @@ end end module InstanceMethods def assign_attributes(new_attributes) + new_attributes.stringify_keys! belongs = self.class.reflect_on_all_associations(:belongs_to).map { |b| { column: "#{b.name}_id", class_name: (b.options[:class_name] || b.name).to_s.classify } } belongs.each do |belong| begin klass = belong[:class_name].safe_constantize @@ -84,10 +85,10 @@ super(new_attributes) end def update_attributes(attributes) - attributes.symbolize_keys! + attributes.stringify_keys! belongs = self.class.reflect_on_all_associations(:belongs_to).map { |b| { column: "#{b.name}_id", class_name: (b.options[:class_name] || b.name).to_s.classify } } belongs.each do |belong| begin klass = belong[:class_name].safe_constantize