Update index.html.erb

Refactored user avatar form submit