Fix deprecation warnings in ERB template