how can i configure/decorate the default log message that fires when a rails controller handles a request to include other information (e.g. the id of the admin user logged in, etc) ?
actually this seems helpful http://www.paperplanes.de/2012/3/14/on-notifications-logsubscribers-and-bringing-sanity-to-rails-logging.html
i have a background job that does a mass import to replace lots of items in the database
i have a background task that does a batch import; i wrap the whole thing in a DB transaction in case the import fails halfway through, but i also want to be able to update a `state` attribute on a Job in the database so i can see the state of this long running vjob
unfortunately if i'm just using a single DB connection it's going to include that Job.state set in the transaction
i am attempting a tricky refactor that involves splitting an ActiveRecord model/table into two
for the purpose of minimizing code changes i've attempted an approach where legacy code that i dont' want to change can still interface with a facade class that pretends to be that old style class
i'd like to spin up a quick server that just barfs the request payload so that i can debug/test webhooks. is there a one-liner httpd esque thing i could use in ruby or what's the easiest way to do this?
Is there a way to specify a cascading delete policy within a rails migration t.references, something like t.references :location, index: true, foreign_key: true, on_delete: :cascade