diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-08-30 01:34:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-30 01:34:33 +0200 |
commit | 8ee4a2892c91323f3f213f132d5fb7cc4bb012c8 (patch) | |
tree | 2a2914d550b892f9a7a37d6a4721c6922c030b02 /config | |
parent | 18e37bee16911826ea3737136d3c94924eb8a9a6 (diff) |
Fix non-GET requests to / not being matched (#11704)
Diffstat (limited to 'config')
-rw-r--r-- | config/routes.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/config/routes.rb b/config/routes.rb index 92f272ff5..c5326052e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -6,6 +6,8 @@ require 'sidekiq-scheduler/web' Sidekiq::Web.set :session_secret, Rails.application.secrets[:secret_key_base] Rails.application.routes.draw do + root 'home#index' + mount LetterOpenerWeb::Engine, at: 'letter_opener' if Rails.env.development? authenticate :user, lambda { |u| u.admin? } do @@ -429,10 +431,6 @@ Rails.application.routes.draw do get '/about/blocks', to: 'about#blocks' get '/terms', to: 'about#terms' - root 'home#index' - - match '*unmatched_route', - via: :all, - to: 'application#raise_not_found', - format: false + match '/', via: [:post, :put, :patch, :delete], to: 'application#raise_not_found', format: false + match '*unmatched_route', via: :all, to: 'application#raise_not_found', format: false end |