From ae2a28b75fd637177843e5827b5c1e285a7bc488 Mon Sep 17 00:00:00 2001 From: Nurfitra Pujo Santiko Date: Fri, 3 Sep 2021 10:47:44 +0700 Subject: [PATCH] Bugfix Post now return post id data (#28) --- models/post.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/models/post.rb b/models/post.rb index 5b0bcf4..372b4a9 100644 --- a/models/post.rb +++ b/models/post.rb @@ -26,6 +26,7 @@ class Post include PostError def initialize(post_data = {}) + @id = post_data[:id] @username = post_data[:username] @text = post_data[:text] @timestamp = post_data[:timestamp] || DateTime.now