adding .text api to resources controller