-
Ruby: Enumerable grep, grep_v
UPDATE: After I wrote this, I started finding myself doing a lot of caller.grep(/(project_directory|suspected_gem)/) to aid in debugging obscure interactions with internal gems and projects. In looking at a pull request and noticing some awkward “first” and “last” iteration detection which also required each_with_index, I started looking into what would be a cleaner way, and…
-
Ruby on Jets Webpacker errors and Invalid Configuration Object
Ruby on Jets webpacker compilation failed and invalid configuration object
-
XML Handler Bypassing ParseError Handling Rack Middleware on Rails 6
In a project using actionpack-xml_parser, and implementing a modified version of Catching Invalid JSON Parse Errors with Rack Middleware to also handle XML errors, an upgrade to Rails 6 broke the handling of the ParseError. Interestingly enough, JSON was being handled as expected. TL;DR: The short answer to this is that config/initializers/wrap_parameters.rb only had json…