<commit_before>Rails.application.routes.draw do

  devise_for :users, :controllers => {:registrations => "registrations", :confirmations => 'confirmations', :passwords => 'passwords', :sessions => 'sessions', :omniauth_callbacks => 'users/omniauth_callbacks'} do
    get "/users/sign_out", :to => "devise/sessions#destroy"
  end

  # WAYFless access point - use query param idp
  get 'auth/shibboleth' => 'users/omniauth_shibboleth_request#redirect', :as => 'user_omniauth_shibboleth'
  get 'auth/shibboleth/assoc' => 'users/omniauth_shibboleth_request#associate', :as => 'user_shibboleth_assoc'

  # fix for activeadmin signout bug
  devise_scope :user do
    get '/users/sign_out' => 'devise/sessions#destroy'
  end

  ActiveAdmin.routes(self)

  #organisation admin area
  #match "org/admin/users" => 'organisation_users#admin_index', :as => "org/admin/users"
  resources :users, :path => 'org/admin/users', only: [] do
    collection do
      get 'admin_index'
    end
    member do
      get 'admin_grant_permissions'
      put 'admin_update_permissions'
    end
  end

  # You can have the root of your site routed with "root"
  # just remember to delete public/index.html.
  root :to => 'home#index'
  get '/:locale' => 'home#index', :as => 'locale_root'

  scope "(:locale)", locale: /#{I18n.available_locales.join("|")}/ do
    get "about_us" => 'static_pages#about_us'
    get "help" => 'static_pages#help'
    get "roadmap" => 'static_pages#roadmap'
    get "terms" => 'static_pages#termsuse'
    get "existing_users" => 'existing_users#index'
  
    #post 'contact_form' => 'contacts', as: 'localized_contact_creation'
    #get 'contact_form' => 'contacts#new', as: 'localized_contact_form'
    
    resources :organisations, :path => 'org/admin' do
      member do
        get 'children'
        get 'templates'
        get 'admin_show'
        get 'admin_edit'
        put 'admin_update'
      end
    end

    resources :guidances, :path => 'org/admin/guidance' do
      member do
        get 'admin_show'
        get 'admin_index'
        get 'admin_edit'
        get 'admin_new'
        delete 'admin_destroy'
        post 'admin_create'
        put 'admin_update'

        get 'update_phases', :as => 'update_phases'
        get 'update_versions', :as => 'update_versions'
        get 'update_sections', :as => 'update_sections'
        get 'update_questions', :as => 'update_questions'
      end
    end

    resources :guidance_groups, :path => 'org/admin/guidancegroup' do
      member do
        get 'admin_show'
        get 'admin_new'
        get 'admin_edit'
        delete 'admin_destroy'
        post 'admin_create'
        put 'admin_update'
      end
    end

    #resource :organisation

    #resources :splash_logs

    resources :dmptemplates, :path => 'org/admin/templates' do
      member do
        get 'admin_index'
        get 'admin_template'
        get 'admin_new'
        get 'admin_addphase'
        get 'admin_phase'
        get 'admin_previewphase'
        get 'admin_cloneversion'
        delete 'admin_destroy'
        delete 'admin_destroyversion'
        delete 'admin_destroyphase'
        delete 'admin_destroysection'
        delete 'admin_destroyquestion'
        delete 'admin_destroysuggestedanswer'
        post 'admin_create'
        post 'admin_createphase'
        post 'admin_createsection'
        post 'admin_createquestion'
        post 'admin_createsuggestedanswer'
        put 'admin_update'
        put 'admin_updatephase'
        put 'admin_updateversion'
        put 'admin_updatesection'
        put 'admin_updatequestion'
        put 'admin_updatesuggestedanswer'
      end
    end

    resources :phases
    resources :versions
    resources :sections
    resources :questions
    resources :question_themes


    resources :themes

    resources :answers
    resources :plan_sections
    resources :comments do
      member do
        put 'archive'
      end
    end

    resources :projects do
      resources :plans do
        member do
          get 'status'
          get 'locked'
          get 'answer'<commit_msg>updated routes to reflect earlier changes i.e. removing unused CRUD, exposed resources and actions<commit_after>Rails.application.routes.draw do

  devise_for :users, :controllers => {:registrations => "registrations", :confirmations => 'confirmations', :passwords => 'passwords', :sessions => 'sessions', :omniauth_callbacks => 'users/omniauth_callbacks'} do
    get "/users/sign_out", :to => "devise/sessions#destroy"
  end

  # WAYFless access point - use query param idp
  get 'auth/shibboleth' => 'users/omniauth_shibboleth_request#redirect', :as => 'user_omniauth_shibboleth'
  get 'auth/shibboleth/assoc' => 'users/omniauth_shibboleth_request#associate', :as => 'user_shibboleth_assoc'

  # fix for activeadmin signout bug
  devise_scope :user do
    get '/users/sign_out' => 'devise/sessions#destroy'
  end

  ActiveAdmin.routes(self)

  #organisation admin area
  #match "org/admin/users" => 'organisation_users#admin_index', :as => "org/admin/users"
  resources :users, :path => 'org/admin/users', only: [] do
    collection do
      get 'admin_index'
    end
    member do
      get 'admin_grant_permissions'
      put 'admin_update_permissions'
    end
  end

  # You can have the root of your site routed with "root"
  # just remember to delete public/index.html.
  root :to => 'home#index'
  get '/:locale' => 'home#index', :as => 'locale_root'

  scope "(:locale)", locale: /#{I18n.available_locales.join("|")}/ do
    get "about_us" => 'static_pages#about_us'
    get "help" => 'static_pages#help'
    get "roadmap" => 'static_pages#roadmap'
    get "terms" => 'static_pages#termsuse'
    get "existing_users" => 'existing_users#index'
  
    #post 'contact_form' => 'contacts', as: 'localized_contact_creation'
    #get 'contact_form' => 'contacts#new', as: 'localized_contact_form'
    
    resources :organisations, :path => 'org/admin', only: [] do
      member do
        get 'children'
        get 'templates'
        get 'admin_show'
        get 'admin_edit'
        put 'admin_update'
      end
    end

    resources :guidances, :path => 'org/admin/guidance', only: [] do
      member do
        get 'admin_show'
        get 'admin_index'
        get 'admin_edit'
        get 'admin_new'
        delete 'admin_destroy'
        post 'admin_create'
        put 'admin_update'

        get 'update_phases'
        get 'update_versions'
        get 'update_sections'
        get 'update_questions'
      end
    end

    resources :guidance_groups, :path => 'org/admin/guidancegroup', only: [] do
      member do
        get 'admin_show'
        get 'admin_new'
        get 'admin_edit'
        delete 'admin_destroy'
        post 'admin_create'
        put 'admin_update'
      end
    end

    resources :dmptemplates, :path => 'org/admin/templates', only: [] do
      member do
        get 'admin_index'
        get 'admin_template'
        get 'admin_new'
        get 'admin_addphase'
        get 'admin_phase'
        get 'admin_previewphase'
        get 'admin_cloneversion'
        delete 'admin_destroy'
        delete 'admin_destroyversion'
        delete 'admin_destroyphase'
        delete 'admin_destroysection'
        delete 'admin_destroyquestion'
        delete 'admin_destroysuggestedanswer'
        post 'admin_create'
        post 'admin_createphase'
        post 'admin_createsection'
        post 'admin_createquestion'
        post 'admin_createsuggestedanswer'
        put 'admin_update'
        put 'admin_updatephase'
        put 'admin_updateversion'
        put 'admin_updatesection'
        put 'admin_updatequestion'
        put 'admin_updatesuggestedanswer'
      end
    end

    resources :answers, only: :create

    resources :comments, only: [:edit, :create, :update] do
      member do
        put 'archive'
      end
    end

    resources :projects do
      resources :plans do
        member do
          get 'status'
          get 'locked'
          get 'answer'
{'fraction_non_alphanumeric': 0.10433046299762885, 'fraction_numerical': 0.000499188818170473, 'mean_word_length': 2.7695202257761053, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 65, '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': '3463862', 'n_tokens_mistral': 2530, 'n_tokens_neox': 2469, 'n_words': 618}