OSC / ood_appkit

https://osc.github.io/Open-OnDemand/
MIT License
1 stars 2 forks source link

Add `Cluster#id` to be the key #14

Closed ericfranz closed 7 years ago

ericfranz commented 8 years ago

This would make it easier to work with in Rails too.

So Cluster#title is "Ruby" but Cluster#id is ruby, the key used in the yaml and correspondingly used in the hash.

ericfranz commented 8 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).

ericfranz commented 8 years ago

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.

nickjer commented 8 years ago

Why do you need to find the cluster again if you already have the cluster object?

nickjer commented 7 years ago

This is fixed as we now use ClusterDecorator objects.