Calculate root key name before presentation

This way, ActiveRecord::Relation objects will be properly used to
generate root keys.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>