ga-wdi-exercises / project2

[project]
1 stars 30 forks source link

Trying to add "upvote" route to my Routes #902

Closed sanjaywallah closed 7 years ago

sanjaywallah commented 7 years ago

I've tried looking this up, but I can't seem to find anything. When I try this, the operation just aborts.

Rails.application.routes.draw do

  root to: "cheerups#index"
  resources :cheerups do
    resources :votes
  end
  resources : cheerups do
    member do
      post 'upvote'
  end
end
jsm13 commented 7 years ago

What is the exact error? Could you also link to your repo in its current state.

It looks like there's a space between the : and cheerups on the second top level resource.

sanjaywallah commented 7 years ago

Hi John: I figure it out. I was missing an end statement.