config/routes.rb in kuhsaft-2.2.6 vs config/routes.rb in kuhsaft-2.3.0

- old
+ new

@@ -1,20 +1,29 @@ Kuhsaft::Engine.routes.draw do + namespace :cms do - resources :pages, :except => :show do - post :sort, :on => :collection + resources :pages, except: :show do + post :sort, on: :collection end - resources :bricks, :except => [:new, :edit, :index] do - post :sort, :on => :collection + + resources :bricks, except: [:edit, :index] do + post :sort, on: :collection end resources :assets - root :to => 'pages#index' + root to: 'pages#index' end - scope ":locale", :locale => /#{I18n.available_locales.join('|')}/ do + scope ':locale', locale: /#{I18n.available_locales.join('|')}/ do + namespace :api, defaults: { format: :json } do + resources :pages, only: :index + end + resources :pages, - :only => [:index], - :defaults => { :locale => I18n.locale } - get '(*url)' => 'pages#show', :as => :page + only: [:index], + defaults: { locale: I18n.locale } + get '(*url)' => 'pages#show', as: :page end + + get '/pages/:id' => 'pages#lookup_by_id' + get '/sitemap.format' => 'sitemaps#index', format: 'xml' end