Update index.html.erb

if else forchecking added