anchor/machiavelli — pull request #23 by glasnt (2014-07-11 06:57:25+00:00)
Title: Remove all instances of @metrics with global gon

It's not very useful having multiple sources of truth of what a metric
is. Since we're now using gon to store more than just a metric list, and
with the changes to metric id and metric meta, it makes sense to use
gon as the one source of truth

Since gon isn't available by default in ruby embedded within views, I've
opted to copy the gon param into @gon for these cases. Small alterations
to which metric type (id/metric) also apply.

Reordering of /index logic is to handle requirement to have a list of
metrics before any flash errors (@graph assignment used to flag the fact
we should graph things, so this appear after all possible error points)