Sha256: 2de4f71d0a2dd13d6c77c1b5e985d224777f155171977a808d3256676e085167

Contents?: true

Size: 442 Bytes

Versions: 9

Compression:

Stored size: 442 Bytes

Contents

Rails.application.routes.draw do

  mount StaticBlocks::Engine => "/static_blocks"

  root to: redirect("/#{I18n.default_locale}/info/index")

  scope ":locale", locale: /#{I18n.available_locales.join("|")}/ do
    get "info/index"
  end

  match '*path', to: redirect("/#{I18n.default_locale}/%{path}"), constraints: lambda { |req| !req.path.starts_with? "/#{I18n.default_locale}/" }
  match '', to: redirect("/#{I18n.default_locale}")

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
static_blocks-1.2.1 spec/dummy/config/routes.rb
static_blocks-1.2.0 spec/dummy/config/routes.rb
static_blocks-1.1.5 spec/dummy/config/routes.rb
static_blocks-1.1.4 spec/dummy/config/routes.rb
static_blocks-1.1.3 spec/dummy/config/routes.rb
static_blocks-1.1.2 spec/dummy/config/routes.rb
static_blocks-1.1.1 spec/dummy/config/routes.rb
static_blocks-1.1.0 spec/dummy/config/routes.rb
static_blocks-1.0.3 spec/dummy/config/routes.rb