Guest User

Untitled

a guest
Feb 20th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. Index: app/controllers/admin/dashboard_controller.rb
  2. ===================================================================
  3. --- app/controllers/admin/dashboard_controller.rb (revision 1210)
  4. +++ app/controllers/admin/dashboard_controller.rb (working copy)
  5. @@ -39,8 +39,11 @@
  6.  
  7. data = age_data(type)
  8. g.data '', data.collect{ |a| a.count.to_i }
  9. - g.labels = data.collect{ |a| a.age_range }
  10. -
  11. +
  12. + data.each_with_index do |a, index|
  13. + g.labels.update index => a.age_range
  14. + end
  15. +
  16. send_graph(g)
  17. end
Add Comment
Please, Sign In to add comment