Login
From:
kevinjmurphy.com
(Uncensored)
subscribe
Finding an Initially Confusing Result in Rails - Kevin Murphy
https://kevinjmurphy.com/posts/find-or-initialize-by-block/
links
backlinks
Rails' find_or_initialize_by method accepts an optional block, but that block is only executed when an existing record is not found by the provided attributes.
Roast topics
Find topics
Roast it!
Roast topics
Find topics
Find it!
Roast topics
Find topics
Find it!