Sha256: de458055bdb03afee435f8531a11d52f3a36a93c1de151cfa8ef5e930d0853f5

Contents?: true

Size: 1.84 KB

Versions: 13

Compression:

Stored size: 1.84 KB

Contents

Rails.application.routes.draw do

  Mumukit::Login.configure_login_routes! self

  Mumukit::Platform.map_organization_routes!(self) do
    root to: 'book#show'

    resources :book, only: [:show]
    resources :chapters, only: [:show] do
      resource :appendix, only: :show
    end

    # All users
    resources :exercises, only: :show do
      # Current user
      resources :confirmations, controller: 'exercise_confirmations', only: :create
      resources :solutions, controller: 'exercise_solutions', only: :create
      resources :queries, controller: 'exercise_query', only: :create
      resources :tries, controller: 'exercise_tries', only: :create
    end

    # All users
    resources :guides, only: :show do
      resource :progress, controller: 'guide_progress', only: :destroy
    end

    resources :lessons, only: :show
    resources :complements, only: :show
    resources :exams, only: :show

    # All users
    resource :user, only: :show

    # Current user
    resources :messages, only: [:index, :create]
    get '/messages/errors' => 'messages#errors'

    # Routes by slug
    get '/guides/:organization/:repository' => 'guides#show_by_slug', as: :guide_by_slug
    get '/exercises/:organization/:repository/:bibliotheca_id' => 'exercises#show_by_slug', as: :exercise_by_slug
    get '/join/:code' => 'invitations#show', as: :invitation
    post '/join/:code' => 'invitations#join'
    get '/user/unsubscribe' => 'users#unsubscribe'
    put '/user' => 'users#update', as: :update_user

    # Route for reading messages
    post '/messages/read_messages/:exercise_id' => 'messages#read_messages', as: :read_messages

    # Organizations assets
    get '/theme_stylesheet'     => 'assets#theme_stylesheet'
    get '/extension_javascript' => 'assets#extension_javascript'
  end

  #Rescue not found routes
  get '*not_found', to: 'application#not_found'
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
mumuki-laboratory-5.0.12 config/routes.rb
mumuki-laboratory-5.0.11 config/routes.rb
mumuki-laboratory-5.0.10 config/routes.rb
mumuki-laboratory-5.0.9 config/routes.rb
mumuki-laboratory-5.0.8 config/routes.rb
mumuki-laboratory-5.0.7 config/routes.rb
mumuki-laboratory-5.0.6 config/routes.rb
mumuki-laboratory-5.0.5 config/routes.rb
mumuki-laboratory-5.0.4 config/routes.rb
mumuki-laboratory-5.0.3 config/routes.rb
mumuki-laboratory-5.0.2 config/routes.rb
mumuki-laboratory-5.0.1 config/routes.rb
mumuki-laboratory-5.0.0 config/routes.rb