Confused 6.2


I've so far went through the excercises and have understood them, but this is very confusing to me.

Task) Next in the routes file, map requests to/destinations/:id to the Destinations controller's show action. Use as: to name this route "destination".

My Solution:

Rails.application.routes.draw do
  get '/tags' => 'tags#index'
  get '/tags/:id' => 'tags#show', as: :tag 
  get '/destinations/:id' => 'destinations#show' as: :destination

This raises the error:

config/routes.rb:4: syntax error, 
unexpected tIDENTIFIER,
expecting keyword_end (SyntaxError)

Could you please explain what this error means, and why my code is wrong.

Thank you in advance,


Upon further testing and inspection, I found that I missed a seperating comma:

get '/destinations/:id' => 'destinations#show', as: :destination