lib/active_shepherd/methods/apply_changes.rb in activeshepherd-0.8.1 vs lib/active_shepherd/methods/apply_changes.rb in activeshepherd-0.8.2

- old
+ new

@@ -10,11 +10,11 @@ before = aggregate.deserialize_value(attribute_name, before) after = aggregate.deserialize_value(attribute_name, after) unless current_value == before - raise ::ActiveShepherd::AggregateRoot::BadChangeError, "Expecting "\ + raise ::ActiveShepherd::BadChangeError, "Expecting "\ "`#{attribute_name} to be `#{before.inspect}', not "\ "`#{current_value.inspect}'" end aggregate.model.send "#{attribute_name}=", after @@ -40,10 +40,10 @@ association.build until association.size >= (index + 1) # /FIXME associated_model = association[index] if associated_model.nil? - raise ::ActiveShepherd::AggregateRoot::BadChangeError, + raise ::ActiveShepherd::BadChangeError, "Can't find record ##{index}" end self.class.apply_changes recurse(associated_model, reflection.foreign_key), changes end