Skip to content

Commit 8acbf0f

Browse files
authored
Merge pull request #22 from ruby/backfill-published
Add reload_from_s3
2 parents bad3d32 + ed437a5 commit 8acbf0f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/models/message.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,13 @@ def self.from_string(str)
3333
published_at: published_at,
3434
)
3535
end
36+
37+
def reload_from_s3
38+
m = self.from_s3(List.find_by_id(self.list_id).name, self.list_seq)
39+
40+
self.body = m.body
41+
self.subject = m.subject
42+
self.from = from
43+
self.published_at = m.published_at
44+
end
3645
end

0 commit comments

Comments
 (0)