Sha256: 60a000e246581605e106e5a7d2e01ca59225e2f6f3f9a927db9de0216975905c

Contents?: true

Size: 1.93 KB

Versions: 23

Compression:

Stored size: 1.93 KB

Contents

# frozen_string_literal: true

Decidim::Core::Engine.routes.draw do
  mount Decidim::Api::Engine => "/api"

  devise_for :users,
             class_name: "Decidim::User",
             module: :devise,
             router_name: :decidim,
             controllers: {
               invitations: "decidim/devise/invitations",
               sessions: "decidim/devise/sessions",
               confirmations: "decidim/devise/confirmations",
               registrations: "decidim/devise/registrations",
               passwords: "decidim/devise/passwords",
               omniauth_callbacks: "decidim/devise/omniauth_registrations"
             }

  devise_scope :user do
    post "omniauth_registrations" => "devise/omniauth_registrations#create"
  end

  resource :locale, only: [:create]

  Decidim.participatory_space_manifests.each do |manifest|
    mount manifest.engine, at: "/", as: "decidim_#{manifest.name}"
  end

  authenticate(:user) do
    resources :authorizations, only: [:new, :create, :index] do
      collection do
        get :first_login
      end
    end
    resource :account, only: [:show, :update, :destroy], controller: "account" do
      member do
        get :delete
      end
    end
    resources :notifications, only: [:index, :destroy] do
      collection do
        delete :read_all
      end
    end
    resource :notifications_settings, only: [:show, :update], controller: "notifications_settings"
    resources :own_user_groups, only: [:index]
  end

  resources :pages, only: [:index, :show], format: false

  get "/scopes/search", to: "scopes#search", as: :scopes_search

  get "/static_map", to: "static_map#show", as: :static_map
  get "/cookies/accept", to: "cookie_policy#accept", as: :accept_cookies

  match "/404", to: "errors#not_found", via: :all
  match "/500", to: "errors#internal_server_error", via: :all

  resource :follow, only: [:create, :destroy]
  resource :report, only: [:create]

  root to: "pages#show", id: "home"
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
decidim-core-0.7.4 config/routes.rb
decidim-core-0.7.3 config/routes.rb
decidim-core-0.7.2 config/routes.rb
decidim-core-0.7.1 config/routes.rb
decidim-core-0.7.0 config/routes.rb
decidim-core-0.6.8 config/routes.rb
decidim-0.6.8 decidim-core/config/routes.rb
decidim-core-0.6.7 config/routes.rb
decidim-0.6.7 decidim-core/config/routes.rb
decidim-core-0.6.6 config/routes.rb
decidim-0.6.6 decidim-core/config/routes.rb
decidim-core-0.6.5 config/routes.rb
decidim-0.6.5 decidim-core/config/routes.rb
decidim-core-0.6.4 config/routes.rb
decidim-0.6.4 decidim-core/config/routes.rb
decidim-core-0.6.3 config/routes.rb
decidim-0.6.3 decidim-core/config/routes.rb
decidim-core-0.6.2 config/routes.rb
decidim-0.6.2 decidim-core/config/routes.rb
decidim-core-0.6.1 config/routes.rb