i'm using rails 2.3.8.
what's best way release connection on model database?
let's have modelb.establish_connection("server_b")
would modelb.remove_connection trick? how verify i've removed connection?
looks though remove_connection you're looking for. verify you've removed connection, wrap find method within rescue block like:
begin modelb.find(1) rescue connectionnotestablished # if we're here, have no connection, in case else # if we're here, still have connection, bad... end
Comments
Post a Comment