Introduced (partly) in #5534
We have various code handing the content item passed back to us from content store. The GDS-API adaptor code returns it as a ruby hash, with string keys. But internally, it's nicer to use the modern ruby symbolic keys, and that's what a lot of components want us to pass them.
We've made flexible sections deal with symbolic keys only, but that means a bit of key translation code inside flexible pages, and additional code in app/models/contents_outline.rb to handle both options. Ideally we'd like to just do the conversion to symbolic keys at the point we load the content item, and then use purely symbolic keys internall.
Potential problems: contextual sidebar, where it appears, does a lot of deep looking inside the content item. If it requires string keys, we will have to handle converting when we pass to it.
Introduced (partly) in #5534
We have various code handing the content item passed back to us from content store. The GDS-API adaptor code returns it as a ruby hash, with string keys. But internally, it's nicer to use the modern ruby symbolic keys, and that's what a lot of components want us to pass them.
We've made flexible sections deal with symbolic keys only, but that means a bit of key translation code inside flexible pages, and additional code in
app/models/contents_outline.rbto handle both options. Ideally we'd like to just do the conversion to symbolic keys at the point we load the content item, and then use purely symbolic keys internall.Potential problems: contextual sidebar, where it appears, does a lot of deep looking inside the content item. If it requires string keys, we will have to handle converting when we pass to it.