RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: parruda
I am new to rails. How do I make this example show the data by hour?
My database has two relevant columns: "data_time" and "values". I have a few values per hour, so, I wanted to plot them all. I was able to group by hour changing:
group("strftime('%Y-%m-%d %H', data_time)")
But the graph still shows only per day. I suspect it has something to do with:
(start.to_date..Date.today).map do |date|
but I can't figure out what it is!