I found a solution. Basically, appending an s to the plural version of the word will singularize it to back to the plural version, not the singular version.
It's a bit cheesy, but this code in show.json.rabl
:
object @work => :elements
child :nodes, :root => :nodes, :object_root => :datas do
attributes :id, :title
end
child :links, :root => :edges, :object_root => :datas do
attribute :parent_id => :source
attribute :child_id => :target
end
yields
"elements":{
"nodes":[
{"data":{"id":820,"title":"Jerry"}},
{"data":{"id":821,"title":"Elaine"}}
etc.
I believe it's because the singularize function doesn't recognize "datas" since it's not a word, so it drops the s by default. Someone who knows ruby a bit better than I might be able to corroborate/shoot that down.
This is probably pretty obvious to people, but perhaps it will help someone like myself who hadn't thought of it.