<commit_before>MushroomObserver::Application.routes.draw do
  # map.resources :publications
  match 'publications/:id/destroy' => 'publications#destroy'
  resources :publications
  
  # The priority is based upon order of creation: first created -> highest priority.
  
  # Default page is /observer/index.
  # map.connect '', :controller => 'observer', :action => 'index'
  root :to => "observer#index"
  
  # Route /123 to /observer/show_observation/123.
  # map.connect ':id', :controller => 'observer', :action => 'show_observation', :id => /\d+/
  match ':id' => "observer#show_observation", :constraints => { :id => /\d+/ }
  
  # Short-hand notation for AJAX methods.
  # map.connect 'ajax/:action/:type/:id', :controller => 'ajax', :id => /\S.*/
  match 'ajax/:action/:type/:id' => "ajax", :constraints => { :id => /\S.*/ }

  # Default action for any controller is 'index'.
  # map.connect ':controller', :action => 'index'
  match ':controller' => ':controller#index'
  
  # Standard routes.
  # map.connect ':controller/:action'
  match ':controller/:action'
  # map.connect ':controller/:action/:id', :id => /\d+/
  match ':controller/:action/:id', :constraints => { :id => /\d+/ }
  
  # Accept non-numeric ids for the lookup_xxx actions.
  # map.connect ':controller/:action/:id', :action => /lookup_\w+/
  match ':controller/:action/:id', :action => /lookup_\w+/

end
<commit_msg>Minor tweaks to routes to fix bug where the id was mistakenly being tacked on to all the links in a page even where they didn't belong.<commit_after>MushroomObserver::Application.routes.draw do
  # map.resources :publications
  match 'publications/:id/destroy' => 'publications#destroy'
  resources :publications

  # The priority is based upon order of creation: first created -> highest priority.

  # Default page is /observer/index.
  # map.connect '', :controller => 'observer', :action => 'index'
  root :to => "observer#index"

  # Route /123 to /observer/show_observation/123.
  # map.connect ':id', :controller => 'observer', :action => 'show_observation', :id => /\d+/
  match ':id' => "observer#show_observation", :constraints => { :id => /\d+/ }

  # Short-hand notation for AJAX methods.
  # map.connect 'ajax/:action/:type/:id', :controller => 'ajax', :id => /\S.*/
  match 'ajax/:action/:type/:id' => "ajax", :constraints => { :id => /\S.*/ }

  # Default action for any controller is 'index'.
  # map.connect ':controller', :action => 'index'
  match ':controller' => ':controller#index'

  # map.connect ':controller/:action/:id', :id => /\d+/
  match ':controller(/:action(/:id))', :constraints => { :id => /\d+/ }

  # Accept non-numeric ids for the lookup_xxx actions.
  # map.connect ':controller/:action/:id', :action => /lookup_\w+/
  match ':controller/:action/:id', :action => /lookup_\w+/

end

{'fraction_non_alphanumeric': 0.18756660746003553, 'fraction_numerical': 0.004262877442273535, 'mean_word_length': 3.772881355932203, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 49, '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': '5956061', 'n_tokens_mistral': 931, 'n_tokens_neox': 886, 'n_words': 246}