<commit_before>Rails.application.routes.draw do
  root 'posts#index'
  resources :users
  resources :sessions, :only => [:create]
  get '/login' => 'sessions#new'
  get '/logout' => 'sessions#destroy'
  resources :posts do
    resources :comments       
    member do
      put 'upvote', to: 'posts#upvote'
      put 'downvote', to: 'posts#downvote'
    end
  end

    resources :comments do 
      member do
        put 'upvote', to: 'comments#upvote'
        put 'downvote', to: 'comments#downvote'
      end
    end
 

  # The priority is based upon order of creation: first created -> highest priority.
  # See how all your routes lay out with "rake routes".

  # You can have the root of your site routed with "root"
  # root 'welcome#index'

  # Example of regular route:
  #   get 'products/:id' => 'catalog#view'

  # Example of named route that can be invoked with purchase_url(id: product.id)
  #   get 'products/:id/purchase' => 'catalog#purchase', as: :purchase<commit_msg>add new comment route for reply button<commit_after>Rails.application.routes.draw do
  root 'posts#index'
  resources :users
  resources :sessions, :only => [:create]
  get '/login' => 'sessions#new'
  get '/logout' => 'sessions#destroy'
  resources :posts do
    resources :comments
    get '/comments/new(/:parent_id)', to: 'comments#new', as: :new_comment
    member do
      put 'upvote', to: 'posts#upvote'
      put 'downvote', to: 'posts#downvote'
    end
  end

  resources :comments do
    member do
      put 'upvote', to: 'comments#upvote'
      put 'downvote', to: 'comments#downvote'
    end
  end


  # The priority is based upon order of creation: first created -> highest priority.
  # See how all your routes lay out with "rake routes".

  # You can have the root of your site routed with "root"
  # root 'welcome#index'

  # Example of regular route:
  #   get 'products/:id' => 'catalog#view'

  # Example of named route that can be invoked with purchase_url(id: product.id)
  #   get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
{'fraction_non_alphanumeric': 0.1171303074670571, 'fraction_numerical': 0.0, 'mean_word_length': 3.279749478079332, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '757241', 'n_tokens_mistral': 646, 'n_tokens_neox': 636, 'n_words': 223}