rails+js+psql