<commit_before>Rails.application.routes.draw do
  
  # devise_for :users
  devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }, 
                     :path_names => { :sign_up => "register" }

  # :resources is the different articles/sites that users post 
  resources :resources

  post "/upvote" => "resources#upvote"
  patch "/upvote" => "resources#upvote"

  post "/downvote" => "resources#downvote"
  patch "/downvote" => "resources#downvote"

  resources :users

  resources :topics 
  

  # root 'welcome#index'
  root 'topics#index'


  # I only needed this route when I was using just Oauth
  # get "/auth/:provider/callback" => "sessions#create"

  get "/signout" => "sessions#destroy", :as => :signout
  # get '/auth/github/callback' => 'sessions#create'

  delete '/resources', to: 'resources#destroy'


end<commit_msg>add nested route for topics<commit_after>Rails.application.routes.draw do
  
  # devise_for :users
  devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }, 
                     :path_names => { :sign_up => "register" }

  # :resources is the different articles/sites that users post 
  resources :resources 

  post "/upvote" => "resources#upvote"
  patch "/upvote" => "resources#upvote"

  post "/downvote" => "resources#downvote"
  patch "/downvote" => "resources#downvote"

  resources :users

  resources :topics do
    get "/resources/new" => "topics#new_resource"
    post "resources/new" => "topics#create_resource"
  end

  # root 'welcome#index'
  root 'topics#index'


  # I only needed this route when I was using just Oauth
  # get "/auth/:provider/callback" => "sessions#create"

  get "/signout" => "sessions#destroy", :as => :signout
  # get '/auth/github/callback' => 'sessions#create'

  delete '/resources', to: 'resources#destroy'
  delete '/resources', to: 'topics#destroy'


end
{'fraction_non_alphanumeric': 0.14135575407251708, 'fraction_numerical': 0.0, 'mean_word_length': 3.7839195979899496, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '715912', 'n_tokens_mistral': 631, 'n_tokens_neox': 596, 'n_words': 153}