<commit_before>Rails.application.routes.draw do

  get 'errors/not_found'
  get 'errors/internal_server_error'
  match "/404", :to => "errors#not_found", :via => :all
  match "/500", :to => "errors#internal_server_error", :via => :all

  match "/clicked-room" => "sync#room", via: [:get, :post]
  get 'reports' => 'reports#index'
  get 'reports/mailchimp'

  ActiveAdmin.routes(self)

  devise_scope :user do
    resource :password,
      path: 'users/passwort',
      controller: 'users/passwords',
      path_names: { new: 'neu' }
    resource :confirmation,
      only: [:new, :create, :show],
      path: 'users/bestaetigung',
      controller: 'users/confirmations',
      path_names: { new: 'neu' }
    resource :registration,
      only: [:new, :create, :destroy],
      path: 'users',
      controller: 'users/registrations',
      path_names: { new: 'registrierung' } do
        post :set_address
        get :graetzls
      end

    post 'users/notification_settings/toggle_website_notification', to: 'notification_settings#toggle_website_notification', as: :user_toggle_website_notification
    post 'users/notification_settings/change_mail_notification', to: 'notification_settings#change_mail_notification', as: :user_change_mail_notification
  end

  devise_for :users, skip: [:passwords, :confirmations, :registrations],
    controllers: {
      sessions: 'users/sessions',
    },
    path_names: {
      sign_in: 'login',
      sign_out: 'logout',
    }

  resources :users, only: [:show, :update]

  resource :user, only: [:edit], path_names: { edit: 'einstellungen' } do
    get 'locations'
    get 'raumteiler', action: 'rooms', as: 'rooms'
    get 'groups'
    get 'zuckerl', action: 'zuckerls', as: 'zuckerls'
  end

  concern :graetzl_before_new do
    collection do
      post 'new', as: :before_new
    end
  end

  resources :activities, only: [:index]
  resources :meetings, path: 'treffen', except: [:show]
  resources :zuckerls, only: [:index]
  resources :rooms, only: [:index]
  resources :posts, only: [:index]

  resources :locations do
    concerns :graetzl_before_new
    resources :zuckerls, path: 'zuckerl', except: [:index, :show]
  end

  resources :room_demands, path: 'wien/raumteiler/raumsuche', except: [:index] do
    post 'toggle', on: :member
  end
  resources :room_offers, path: 'wien/raumteiler/raum', except: [:index] do
    get 'select', on: :collection
    post 'toggle', on: :member
  end
  resources :room_calls, path: 'wien/raumteiler/open-calls', except: [:index] do
    get 'submission', on: :member
    post 'add_submission', on: :member
  end


  resources :groups, except: [:index] do
    resources :discussions, only: [:index, :show, :create, :edit, :update, :destroy] do
      post :toggle_following, on: :member
    end
    resources :discussion_posts, only: [:create, :update, :destroy]
    post 'request_join', on: :member
    post 'accept_request', on: :member
    post 'reject_request', on: :member
    post 'remove_user', on: :member
    get 'compose_mail', on: :member
    post 'send_mail', on: :member
  end

  get 'wien/raumteiler/raumsuche' => redirect('/wien/raumteiler')
  get 'wien/raumteiler/raum' => redirect('/wien/raumteiler')
  get 'raumteiler' => redirect('/wien/raumteiler')
  get 'dieselgasse' => redirect('/wien/raumteiler/open-calls/raumteiler-hub-dieselgasse')
  get 'flowmarkt' => redirect('https://blog.imgraetzl.at/allgemein/flowmarkt-eroeffnung-raumteiler-hub-dieselgasse/')
  get 'raumteilerfestival', to: 'landing_pages#raumteiler_festival_2018'
  get 'raumteilerfestival/info', to: 'landing_pages#raumteiler_festival_2018_infos'

  resource :wien, controller: 'wien', only: [:show] do
    get 'visit_graetzl'
    get 'treffen', action: 'meetings', as: 'meetings'
    get 'locations'
    get 'raumteiler', action: 'rooms', as: 'rooms'<commit_msg>added also flohmarkt redirect<commit_after>Rails.application.routes.draw do

  get 'errors/not_found'
  get 'errors/internal_server_error'
  match "/404", :to => "errors#not_found", :via => :all
  match "/500", :to => "errors#internal_server_error", :via => :all

  match "/clicked-room" => "sync#room", via: [:get, :post]
  get 'reports' => 'reports#index'
  get 'reports/mailchimp'

  ActiveAdmin.routes(self)

  devise_scope :user do
    resource :password,
      path: 'users/passwort',
      controller: 'users/passwords',
      path_names: { new: 'neu' }
    resource :confirmation,
      only: [:new, :create, :show],
      path: 'users/bestaetigung',
      controller: 'users/confirmations',
      path_names: { new: 'neu' }
    resource :registration,
      only: [:new, :create, :destroy],
      path: 'users',
      controller: 'users/registrations',
      path_names: { new: 'registrierung' } do
        post :set_address
        get :graetzls
      end

    post 'users/notification_settings/toggle_website_notification', to: 'notification_settings#toggle_website_notification', as: :user_toggle_website_notification
    post 'users/notification_settings/change_mail_notification', to: 'notification_settings#change_mail_notification', as: :user_change_mail_notification
  end

  devise_for :users, skip: [:passwords, :confirmations, :registrations],
    controllers: {
      sessions: 'users/sessions',
    },
    path_names: {
      sign_in: 'login',
      sign_out: 'logout',
    }

  resources :users, only: [:show, :update]

  resource :user, only: [:edit], path_names: { edit: 'einstellungen' } do
    get 'locations'
    get 'raumteiler', action: 'rooms', as: 'rooms'
    get 'groups'
    get 'zuckerl', action: 'zuckerls', as: 'zuckerls'
  end

  concern :graetzl_before_new do
    collection do
      post 'new', as: :before_new
    end
  end

  resources :activities, only: [:index]
  resources :meetings, path: 'treffen', except: [:show]
  resources :zuckerls, only: [:index]
  resources :rooms, only: [:index]
  resources :posts, only: [:index]

  resources :locations do
    concerns :graetzl_before_new
    resources :zuckerls, path: 'zuckerl', except: [:index, :show]
  end

  resources :room_demands, path: 'wien/raumteiler/raumsuche', except: [:index] do
    post 'toggle', on: :member
  end
  resources :room_offers, path: 'wien/raumteiler/raum', except: [:index] do
    get 'select', on: :collection
    post 'toggle', on: :member
  end
  resources :room_calls, path: 'wien/raumteiler/open-calls', except: [:index] do
    get 'submission', on: :member
    post 'add_submission', on: :member
  end


  resources :groups, except: [:index] do
    resources :discussions, only: [:index, :show, :create, :edit, :update, :destroy] do
      post :toggle_following, on: :member
    end
    resources :discussion_posts, only: [:create, :update, :destroy]
    post 'request_join', on: :member
    post 'accept_request', on: :member
    post 'reject_request', on: :member
    post 'remove_user', on: :member
    get 'compose_mail', on: :member
    post 'send_mail', on: :member
  end

  get 'wien/raumteiler/raumsuche' => redirect('/wien/raumteiler')
  get 'wien/raumteiler/raum' => redirect('/wien/raumteiler')
  get 'raumteiler' => redirect('/wien/raumteiler')
  get 'dieselgasse' => redirect('/wien/raumteiler/open-calls/raumteiler-hub-dieselgasse')
  get 'flohmarkt' => redirect('https://blog.imgraetzl.at/allgemein/flowmarkt-eroeffnung-raumteiler-hub-dieselgasse/')
  get 'flowmarkt' => redirect('https://blog.imgraetzl.at/allgemein/flowmarkt-eroeffnung-raumteiler-hub-dieselgasse/')
  get 'raumteilerfestival', to: 'landing_pages#raumteiler_festival_2018'
  get 'raumteilerfestival/info', to: 'landing_pages#raumteiler_festival_2018_infos'

  resource :wien, controller: 'wien', only: [:show] do
    get 'visit_graetzl'
    get 'treffen', action: 'meetings', as: 'meetings'
    get 'locations'
    get 'raumteiler', action: 'rooms', as: 'rooms'
{'fraction_non_alphanumeric': 0.14216188524590165, 'fraction_numerical': 0.003586065573770492, 'mean_word_length': 4.140882159315339, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 26, 'https://': 3, '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': '299430', 'n_tokens_mistral': 2783, 'n_tokens_neox': 2716, 'n_words': 641}