I would like to keep a version of an object before it's updated.
For example:
This is the article on create:
#<Article:0x007fc32af4c910
id:1,
title: "Guitar",
price: 300,
buying_price: 50,
created_at: Sun, 17 Feb 2019 14:39:21 UTC +00:00,
updated_at: Sun, 17 Feb 2019 14:39:21 UTC +00:00,
>
This is an update of the article:
#<Article:0x007fc32af4c910
id:1,
title: "Guitar",
price: 300,
buying_price: 35,
created_at: Sun, 17 Feb 2019 14:39:21 UTC +00:00,
updated_at: Mon, 18 Feb 2019 14:39:21 UTC +00:00,
>
This the another update of the article:
#<Article:0x007fc32af4c910
id:1,
title: "Guitar",
price: 380,
buying_price: 45
created_at: Sun,17 Feb 2019 14:39:21 UTC +00:00,
updated_at: Wed, 20 Feb 2019 14:39:21 UTC +00:00,
>
See the the prices have changed, but I want to be able to report them all in an accounting table:
date | buying_price | price
17 feb |50 |300|
18 feb |35 |300|
20 feb |45 |380|
sorry I don't know how to create a table on markdown here