Sha256: 83b32c26cad37f6f08a2b2e874db4f492cad43b60fb4e5a64a1e0d0c5de6d5d2

Contents?: true

Size: 1.5 KB

Versions: 38

Compression:

Stored size: 1.5 KB

Contents

# frozen_string_literal: true

Rails.application.routes.draw do
  mount EffectiveEvents::Engine => '/', as: 'effective_events'
end

EffectiveEvents::Engine.routes.draw do
  # Public routes
  scope module: 'effective' do

    # Event Category routes
    match 'events/:category', to: 'events#index', via: :get, constraints: lambda { |req|
      EffectiveEvents.categories.map(&:parameterize).include?(req.params['category'])
    }

    match "events/:category/:id", to: 'events#show', via: :get, constraints: lambda { |req|
      EffectiveEvents.categories.map(&:parameterize).include?(req.params['category'])
    }

    resources :events, only: [:index, :show] do
      resources :event_registrations, only: [:new, :show, :destroy] do
        resources :build, controller: :event_registrations, only: [:show, :update]
      end
    end
  end

  namespace :admin do
    resources :events, except: [:show]
    resources :event_registrations, only: [:index, :show]
    resources :event_notifications, except: [:show]

    resources :event_tickets, except: [:show] do
      post :archive, on: :member
      post :unarchive, on: :member
    end

    resources :event_products, except: [:show] do
      post :archive, on: :member
      post :unarchive, on: :member
    end

    resources :event_registrants, except: [:show] do
      post :archive, on: :member
      post :unarchive, on: :member
    end

    resources :event_addons, except: [:show] do
      post :archive, on: :member
      post :unarchive, on: :member
    end

  end

end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
effective_events-0.11.3 config/routes.rb
effective_events-0.11.2 config/routes.rb
effective_events-0.11.1 config/routes.rb
effective_events-0.11.0 config/routes.rb
effective_events-0.10.2 config/routes.rb
effective_events-0.10.1 config/routes.rb
effective_events-0.10.0 config/routes.rb
effective_events-0.9.3 config/routes.rb
effective_events-0.9.2 config/routes.rb
effective_events-0.9.1 config/routes.rb
effective_events-0.9.0 config/routes.rb
effective_events-0.8.0 config/routes.rb
effective_events-0.7.4 config/routes.rb
effective_events-0.7.3 config/routes.rb
effective_events-0.7.2 config/routes.rb
effective_events-0.7.1 config/routes.rb
effective_events-0.7.0 config/routes.rb
effective_events-0.6.13 config/routes.rb
effective_events-0.6.12 config/routes.rb
effective_events-0.6.11 config/routes.rb