few fixes
got rid of some code
changed array to relation in posts#index
merge