params key

Steve Glaz wrote:

What is the best way to see if a certain key exists in my params hash in
my controller?


Now read your Ruby tutorial for a little while!

And note that has_key? is sometimes only an intermediate solution, where you might really need the more compact expression:

  params.fetch(key, 'default value')