lib/toy/reloadable.rb in toystore-0.10.1 vs lib/toy/reloadable.rb in toystore-0.10.2

- old
+ new

@@ -2,10 +2,10 @@ module Reloadable def reload if attrs = adapter.read(id) attrs['id'] = id instance_variables.each { |ivar| instance_variable_set(ivar, nil) } - initialize_attributes_with_defaults + initialize_attributes send(:attributes=, attrs, new_record?) self.class.lists.each_key { |name| send(name).reset } self.class.references.each_key { |name| send("reset_#{name}") } else raise NotFound.new(id)