Poll using Active Record and postgres