Closed ericfranz closed 7 years ago
Otherwise, if I have a single instance of Cluster
, I can't use it to determine the key in the "hash" of clusters to "find it" in the future (i.e. build a link to it, for example).
In a few cases this should make the code a little cleaner, but we probably can get around this as long as we iterate over the hash instead of an array. So this isn't urgent.
Why do you need to find the cluster again if you already have the cluster object?
This is fixed as we now use ClusterDecorator
objects.
This would make it easier to work with in Rails too.
So
Cluster#title
is "Ruby" butCluster#id
isruby
, the key used in the yaml and correspondingly used in the hash.