minor edit to index
converted form to rails 4, added join table