Rails.application.routes.draw do

  root 'application#index'

  namespace :api do
    namespace :v1 do
      resources :causes, only: [:index, :show] do
        resources :events, only: [:index, :show, :new]
      end
    end
  end
end

Rails.application.routes.draw do

  root 'application#index'

  namespace :api do
    namespace :v1 do
      resources :causes, only: [:index, :show] do
        resources :events, only: [:index, :show, :new, :create]
      end
    end
  end
end

Add create resource for events
Add create resource for events
