Bug in implemented tagging system

前端 未结 1 1172
时光取名叫无心
时光取名叫无心 2021-01-26 07:15

I have followed Hartl\'s tutorial to make a ToDoList with a tagging system, also with the help of this word guide and video. However, I do not really understand how the tagging

1条回答
  •  南方客
    南方客 (楼主)
    2021-01-26 07:25

    If I understood correctly, when you click the particular tag in the list you supposed to be redirected to the page "Filtered Micropost Page" that contains all posts that include clicked tag.

    From your view, microposts/index.html.erb you're sending user to tag_path so that's where all logic starts.

    Based on ternary operator you hav on MicroPostController#index that means your params[:tag] is nil and you're listing all posts.

    Could you please Stdout params.inspect

    Cheers

    0 讨论(0)
提交回复
热议问题