active record and ajax