Skip to content

Commit

Permalink
Remove constraint for cms specific url
Browse files Browse the repository at this point in the history
  • Loading branch information
ebrett committed Oct 13, 2023
1 parent b05dc19 commit 8d2a090
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,32 @@

resources :settings, only: %i[show create]

constraints CmsRouteConstraint.new do
devise_for :users
devise_scope :user do
get "sign_in", to: "devise/sessions#new"
delete "sign_out", to: "devise/sessions#destroy"
end
devise_for :users
devise_scope :user do
get "sign_in", to: "devise/sessions#new"
delete "sign_out", to: "devise/sessions#destroy"
end

namespace :admin do
root to: "users#index"
resources :users
resources :articles do
namespace :admin do
root to: "users#index"
resources :users
resources :articles do
post "publish", on: :member
post "unpublish", on: :member
end
resources :content_pages, path: "pages" do
get "versions", on: :member
get "preview_of_live", on: :member
post "unpublish", on: :member
resources :content_page_versions do
get "preview_of_draft", on: :member
post "publish", on: :member
post "unpublish", on: :member
end
resources :content_pages, path: "pages" do
get "versions", on: :member
get "preview_of_live", on: :member
post "unpublish", on: :member
resources :content_page_versions do
get "preview_of_draft", on: :member
post "publish", on: :member
end
end
resources :content_blocks, path: "blocks", only: %i[index new edit create update]
resources :content_assets, path: "assets"
# This is not a resource route
post "preview_markdown", to: "content_pages#preview"
end
resources :content_blocks, path: "blocks", only: %i[index new edit create update]
resources :content_assets, path: "assets"
# This is not a resource route
post "preview_markdown", to: "content_pages#preview"
end

%w[accessibility-statement contact-us disclaimer child-development-training].each do |static_page|
Expand Down

0 comments on commit 8d2a090

Please sign in to comment.