Using HTTP request body for Rails routing: Slack integration case study
I’ve been recently working on a Slack bot and Slack delivers all events (webhooks) to the same URL that you can configure. That means you need to distinguish between different events types based on the payload (request body). In the past, I’ve seen that Rails apps usually reimplement their own “slack routing” within a single controller action. I wanted to share a different solution that I came up with. Let’s do routing in rails routing. ...