def require_models
      model_dir = File.join(File.dirname(__FILE__), %w{ model })
      unless Dir.exist? model_dir
        raise "model directory '#{model_dir}' not exists"
      end
      Dir[File.join(model_dir, '*.rb')].each do |f|
        # puts f
        require f
      end
    end
def require_models
      model_dir = File.join(File.dirname(__FILE__), %w{ model })
      unless Dir.exist? model_dir
        raise "model directory '#{model_dir}' not exists"
      end
      Dir[File.join(model_dir, '*.rb')].each do |f|
        # puts f
        require f
      end
    end
model must be loaded after the connection is established