Re: [Rails-core] Graceful handling of missing STI constants

2015-01-26 Thread Maxim Chernyak
> On Jan 26, 2015, at 11:49 AM, Jason Fleetwood-Boldt > wrote: > > If I were you I’d stub out all the different objects with ‘shell’ > implementations in your master branch, and then AR won’t blow up when it > tries to instantiate the objects. Then you can leave implementation details > to

Re: [Rails-core] Graceful handling of missing STI constants

2015-01-26 Thread Jason Fleetwood-Boldt
If I were you I’d stub out all the different objects with ‘shell’ implementations in your master branch, and then AR won’t blow up when it tries to instantiate the objects. Then you can leave implementation details to the branches where you want to implement/test them. Also it seems odd to me

Re: [Rails-core] Graceful handling of missing STI constants

2015-01-26 Thread Xavier Noria
You're facing one possible way to have incompatible schemas between branches. They are created by workflows external to Active Record, to me it doesn't makes sense that Active Record acts in a way it is not supposed to, to address divergences in Git branches. Divergence in Git branches is an exte

Re: [Rails-core] Graceful handling of missing STI constants

2015-01-25 Thread Maxim Chernyak
On Sunday, January 25, 2015 at 8:50:07 PM UTC-5, Matt jones wrote: > > > On Jan 25, 2015, at 3:42 PM, Maxim Chernyak > wrote: > > > When using STI, if you introduce a new subclass in a git branch, then > create a db record while in it, then switch to another branch, you will get > uninitialized

Re: [Rails-core] Graceful handling of missing STI constants

2015-01-25 Thread Matt Jones
On Jan 25, 2015, at 3:42 PM, Maxim Chernyak wrote: > When using STI, if you introduce a new subclass in a git branch, then create > a db record while in it, then switch to another branch, you will get > uninitialized constant error when trying to query those records. Certain > kinds of applic

Re: [Rails-core] Graceful handling of missing STI constants

2015-01-25 Thread Maxim Chernyak
On Sunday, January 25, 2015 at 3:51:52 PM UTC-5, Andrew Kaspick wrote: > > Why not just use different databases in your different git branches? > To avoid losing accumulated sample data, and avoid maintaining setup scripts when they aren't a priority yet. > > On Sun, Jan 25, 2015 at 3:42 PM, M

Re: [Rails-core] Graceful handling of missing STI constants

2015-01-25 Thread Andrew Kaspick
Why not just use different databases in your different git branches? On Sun, Jan 25, 2015 at 3:42 PM, Maxim Chernyak wrote: > When using STI, if you introduce a new subclass in a git branch, then > create a db record while in it, then switch to another branch, you will get > uninitialized consta

[Rails-core] Graceful handling of missing STI constants

2015-01-25 Thread Maxim Chernyak
When using STI, if you introduce a new subclass in a git branch, then create a db record while in it, then switch to another branch, you will get uninitialized constant error when trying to query those records. Certain kinds of applications (like ours) could run into this a lot, so I'm wonderin