A common pattern I encounter is writing a class with only one public method so that instance variables can be shared amongst its private methods. Is there a superior way of handling such cases?
I've refactored some code to make a few database queries in parallel via Threads. All our test are run in transactions, so this breaks some existing tests. What is my best option for resolving this?
lupine: I wish we could upgrade to the latest right now, but that will take some time
the only native way to handle this is to perform the cleanup manually?
Do you think that's better than the parser constructing the ExcelFile directly?
I hope I'm not wasting too much of your time. This is extremely helpful for me :)
When you said "I think it falls apart in a Rails application slightly ... because of the Active Record pattern. There is no real clear separation between structs and database queries.", what did you mean?
I'm imagining a pattern where models handle DB queries and simple data holding, but where most buisness logic has been moved out of the models to other classes or modules that reside in lib/
So the models are simple value-holding entity representations—usually tied to a db table—which are acted upon by more conventional logic outside of rails patterns.
Like how you wouldn't build your buisness logic inside the String class.