Rails Model with attribute that has different value on different day -
i have model called table, table has attributes called price. , price may change everyday whenever owner of table wants to. how can keep track of values of price can return price of table on 1st jan 2017 or other past dates.
one way make price new model tablecalendarprice
has 2 attributes date
, price
, reference table
model.
Comments
Post a Comment