It sounds like you probably don’t want to be using controller actions then. Controllers are typically middlemen between models and views. Hence they’re expecting you to render something, whether that’s html, json or just plain headers.
Have you fully read up on Routes and Controllers?
Also, is there a particular reason why you’re defining recom as a resource and then using a member route? This will attempt to use the recom controller and whatever action is after get, in this case ‘recom/req’ which I’m not sure is valid but I may be wrong. It be might be trying to default to the show action hence your error.
If you just wanted to provide a path just for the req action you could just use
get 'recom/req', to: 'recom#req'
Anyway, what relevance does this have to Discourse? ![]()