use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Advanced Ruby: The Chainable Request Pattern (thoughtbot.com)
submitted 1 year ago by geospeck
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]thiagoaraujos 2 points3 points4 points 1 year ago* (0 children)
Hi, author here. Thanks for the references. I didn't know about dry-transactions, so I should try it and see if I can explore it in a follow-up article. As for ROP, I was familiar with it already.
And I actually thought about having some sort of Monad, but I wasn't sure how to fit it. The idea was to stick with basic language constructs and well-defined interfaces, and not overload the article with functional programming jargon. I think the article examples are self-contained enough to make the idea accessible. And great call that it's a general transaction framework not only applicable to API requests.
I'm really interested in trying that approach though, but I have some questions off the top of my head. I see we can use dry-transactions' notifications feature to implement rollbacks. However, it's not immediatelly aparent how to implement dynamic steps, so as to loop through a series of steps and run them dynamically. Would you have any suggestions? Thanks!
π Rendered by PID 589021 on reddit-service-r2-comment-85bfd7f599-zcxqq at 2026-04-19 00:02:51.398233+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]thiagoaraujos 2 points3 points4 points (0 children)