Sha256: 0b0c7cebe655ed2666a128f9a4140967da395e2acbc7850fa697e8f7fa26b197

Contents?: true

Size: 441 Bytes

Versions: 3

Compression:

Stored size: 441 Bytes

Contents

Rails.application.routes.draw do

  root to: redirect("/#{I18n.default_locale}/info/index")
  mount StaticBlocks::Engine => "/static_blocks"

  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

3 entries across 3 versions & 1 rubygems

Version Path
static_blocks-1.0.2 spec/dummy/config/routes.rb
static_blocks-1.0.1 spec/dummy/config/routes.rb
static_blocks-1.0.0 spec/dummy/config/routes.rb