I want to limit the number of records that a table can hold in rails. If I have a notification table, how can I make it work for only 50 records at a time. So, if a new record is added, the first is deleted, and the new is saved as 50.
Is there any cool rails method for this automatically or do I need to manually implement it in my model when I create a new notification?
source share