In week 4 video I see that we create the link between a hashtag using gsub on specific text where it has #. It goes on to further state that we are passing the text. In the controller I noticed that in order to find the hashtag it uses the params[:id] (code below).
I find this a tad confusing as from what I can gather the hashtag itself does not have an ID it is simply matched text.
So in short where does this ID come from and why is it not being matched by params[:text].
Apologies if I am missing something really clear here.
class HashTagsController < ApplicationController def show @hashtag = params[:id] @shouts = Shout.search(@hashtag) end end