Skip to content

Commit e5e295c

Browse files
committed
add debug messages on changes
1 parent 939b7e2 commit e5e295c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/easy/reference_data/refresh.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ def self.refresh(clazz, unique_attribute_symbol, unique_attribute_value, attribu
1111
record.send "#{key}=", value
1212
end
1313

14+
if record.new_record?
15+
puts " new #{clazz}(#{unique_attribute_value})"
16+
elsif record.changed?
17+
puts " updating #{clazz}(#{unique_attribute_value})"
18+
end
19+
1420
begin
1521
record.save!
1622
rescue

0 commit comments

Comments
 (0)