add before_filter to post controller,add -if current_user==post.user- to post index