Move index to erb template.