Using Ruby Hash instead of Rails ActiveRecord in Coffeescript / Morris.JS
- by Vanessa L'olzorz
I'm following the Railscast #223 that introduced Morris.JS.
I generate a data set called @orders_yearly in my controller and in my view I have the following to try and render the graph:
<%= content_tag :div, "", id: "orders_chart", data: {orders: @orders_yearly} %>
Calling @orders_yearly.inspect shows it's just a simple hash:
…