This delivers JSON data to front-end code & so it would normally be in on an /api/ route. (Same comment on the routes.rb change, of course.)