I can’t quite understand why this isn’t a default feature of ActiveResource, but wouldn’t one think that developers would need to have at least two different environment services like development and production?
When I was implementing Breadboard on our front-end code, I quickly found that there were a few bugs that needed to be weeded out before it could be widely used by the team. For one thing, whenever you were inheriting site settings from parent classes, that would automatically be set for you, but with Breadboard it wasn’t checking if the parent class was assigned a proper site service and would automatically fall back to the default service value. I made a patch that performed the necessary checks on parent classes before the fallback to the default service.
Another interesting bug that we found was that sometimes the services were not getting set. It ended up being that when an ActiveResource model set self.site, it also set @connection equal to nil which was a key component missing the Breadboard gem that was causing some inconsistencies. A quick method write solved the problem and we were able to get Breadboard out into the workflow of the Online team.