Made post_index work correctly with models