Real time chat on Ruby on Rails and PostgreSQL