Rails security upgrade