partial now working. tidied up code in index.erb
tidied up code. partials now working