Successfully got Rails to write new averages and ratings