From: Robert Klemme Date: 2012-01-26T16:55:55+09:00 Subject: Re: A sort of design question On Thu, Jan 26, 2012 at 1:35 AM, Panagiotis Atmatzidis wrote: > On 25 Ιαν 2012, at 23:34 , Abinoam Jr. wrote: >> I think Robert Klemme is telling you to do something like this. Exactly! >> https://github.com/abinoam/morula/commit/40e7745c54446363b8cd32d2d05cf0cee4a70df9 >> >> Abinoam Jr. > > Thanks for that :-) I merged it. I didn't had much time to look at the code today so thanks for clarifying this in terms of code. Just one nitpick: in the method #create_table the begin rescue end should have an "ensure" clause where the db.close is located. This ensures that the db is closed no matter how the block is left. You might also want to evaluate the actual exception's error message. Might be something else than "table exists". Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/