Sha256: 73685b38a78409ae4295714c4f41adacf0a8ec4f0743cb66c0fe6114476796d3

Contents?: true

Size: 881 Bytes

Versions: 2

Compression:

Stored size: 881 Bytes

Contents

Rails.application.routes.draw do

  concern :routes do
    root to: 'pages#index'
    get 'simple', to: 'pages#simple', as: :simple
    get 'complex/:p1/:p2', to: 'pages#complex', as: :complex
    namespace :namespace do
      get 'nested', to: 'pages#nested', as: :nested
      resources :resources
    end
    resources :resources do
      member do
        get 'member'
      end
      collection do
        get 'collection'
      end
      resources :nested
    end
  end

  localized strategy: :param, locales: %i(es en) do
    scope as: :param do
      concerns :routes
    end
  end

  localized strategy: :subdomain, locales: { 'es' => :es, 'en' => :en } do
    scope as: :subdomain do
      concerns :routes
    end
  end

  localized strategy: :domain, locales: { 'test.es' => :es, 'test.en' => :en } do
    scope as: :domain do
      concerns :routes
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
localizable_routes-4.0.0.1 test/dummy/config/routes.rb
localizable_routes-4.0.0.0 test/dummy/config/routes.rb