Use rails generic way of checking a connection status

'select 1' does not work for some databases (oracle...)