Sha256: 3f2e21f280590ef69778206868c1f6a9e50776f780d0d963fd8f5d4011f01e95

Contents?: true

Size: 1.04 KB

Versions: 14

Compression:

Stored size: 1.04 KB

Contents

MessageTrain::Engine.routes.draw do
  concern :boxable do
    resources :boxes, path: 'box', param: :division, only: [:show, :update, :destroy] do
      resources :conversations, only: [:show, :update, :destroy]
      resources :messages, except: [:index, :destroy]
      get 'participants/:model', as: :model_participants, to: 'participants#index'
      get 'participants/:model/:id', as: :model_participant, to: 'participants#show'
    end
  end

  authenticated MessageTrain.configuration.user_route_authentication_method do
    concerns :boxable
    resources :collectives, as: :collective, only: [], concerns: :boxable
    resources :unsubscribes, only: [:index, :create, :destroy]
  end

  match '/box(/*path)', to: redirect(MessageTrain.configuration.user_sign_in_path), via: [:get, :put, :post, :delete]
  match '/collectives(/*path)', to: redirect(MessageTrain.configuration.user_sign_in_path), via: [:get, :put, :post, :delete]
  match '/unsubscribes(/*path)', to: redirect(MessageTrain.configuration.user_sign_in_path), via: [:get, :put, :post, :delete]
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
message_train-0.3.0 config/routes.rb
message_train-0.2.12 config/routes.rb
message_train-0.2.11 config/routes.rb
message_train-0.2.10 config/routes.rb
message_train-0.2.9 config/routes.rb
message_train-0.2.8 config/routes.rb
message_train-0.2.7 config/routes.rb
message_train-0.2.6 config/routes.rb
message_train-0.2.5 config/routes.rb
message_train-0.2.4 config/routes.rb
message_train-0.2.3 config/routes.rb
message_train-0.2.2 config/routes.rb
message_train-0.2.1 config/routes.rb
message_train-0.2.0 config/routes.rb