Rails updatedat not updating
I’ve wanted to add an admin dashboard to a Rails project so I could easily see a summary of some key datapoints.There’s a few options for adding data visualizations to a Rails app, but I wanted something that would continuously update.We can make this AJAX request with j Query in ensures that plot is drawn as soon as the page loads.
At my dayjob I sometimes have to copy database records, I know that rails has at least 2 (if you know more, please let me know!
So now we have a plot of the data, but it doesn’t respond to new votes.
We’ll have to refresh the entire page to update the plot.
To do the re-fetching, I added an function, but it only modifies the height of the bars and leaves the remaining attributes as they are.
After entering the new data, the bars will smoothly transition to their new heights.