snsei_ has quit [Remote host closed the connection]
feepbot has quit [Ping timeout: 245 seconds]
feepbot has joined #amber
feepbot has quit [Read error: Connection reset by peer]
feepbot has joined #amber
wantansoup has joined #amber
wantansoup has quit [Client Quit]
<FromGitter>
<PlayLights_twitter> Hello there!
<FromGitter>
<PlayLights_twitter> Is there any way to change the adapter of a instance on run time?
<FromGitter>
<Blacksmoke16> What's the use case?
<FromGitter>
<PlayLights_twitter> I mean, I have two different DB url's, one for reading and one for writing, so when I want to write I have to change the adapter
<FromGitter>
<Blacksmoke16> hmm
<FromGitter>
<Blacksmoke16> it would have to be a feature request
<FromGitter>
<Blacksmoke16> but you could prob monkey patch it
<FromGitter>
<PlayLights_twitter> My initial approach was having a separate models, but I don't know how to pass from one to another class and also updating both would be a problem
<FromGitter>
<Blacksmoke16> basically all the `adapter` macro does is set a class var
<FromGitter>
<PlayLights_twitter> actually I was looking at the code on the repository to see where should do it
<FromGitter>
<Blacksmoke16> like support slave/master database connections
<FromGitter>
<PlayLights_twitter> Done, but I'm going to look at it for a temporal way to do it since I have heavy traffic and I need to speed up the db actions
<FromGitter>
<Blacksmoke16> Let me think about it
<FromGitter>
<Blacksmoke16> Might be able to do this
<FromGitter>
<Blacksmoke16> what happens if you do like