Sha256: 38b9b564341d79d7258debb402fa0545b1751d145be6bea5d2296ef4d382b447

Contents?: true

Size: 1.92 KB

Versions: 9

Compression:

Stored size: 1.92 KB

Contents

Pageflow::Engine.routes.draw do
  constraints Pageflow.config(:ignore_not_configured => true).editor_route_constraint do
    resources :entries, :only => [:edit, :update], :shallow => true do
      get :partials, :on => :member

      resources :revisions, :only => [:show] do
        delete :current, :to => 'revisions#depublish_current', :on => :collection
      end

      resources :chapters, :only => [:create, :update, :destroy] do
        collection do
          patch :order
        end

        resources :pages, :only => [:create, :update, :destroy] do
          collection do
            patch :order
          end
        end
      end

      resource :edit_lock
    end

    namespace :editor do
      resources :entries, :only => :index, :shallow => true do
        get :seed, :on => :member

        resources :files, :path => 'files/:collection_name', :only => [:index, :create, :update] do
          get :retry, :on => :member
        end

        resources :file_usages, :only => [:create, :destroy]

        resources :encoding_confirmations, :only => [:create] do
          post :check, :on => :collection
        end

        resources :entry_publications, :only => [:create] do
          post :check, :on => :collection
        end
      end

      resources :subjects, path: '/subjects/:collection_name', only: [] do
        resources :widgets, :only => [:index] do
          patch :batch, :on => :collection
        end
      end
    end

    root :to => redirect('/admin')
  end

  get ':entry_id/videos/:id', :to => 'files#show', :as => :short_video_file, :defaults => {:collection_name => 'video_files'}
  get ':entry_id/audio/:id', :to => 'files#show', :as => :short_audio_file, :defaults => {:collection_name => 'audio_files'}

  resources :entries, :only => [:show]
  get ':id', :to => 'entries#show', :as => :short_entry
  get '/', :to => 'entries#index', :as => :public_root

  get ':id/pages/:page_index', :to => 'entries#page'
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pageflow-0.9.2 config/routes.rb
pageflow-0.9.1 config/routes.rb
pageflow-0.9.0 config/routes.rb
pageflow-0.8.2 config/routes.rb
pageflow-0.8.1 config/routes.rb
pageflow-0.8.0 config/routes.rb
pageflow-0.7.2 config/routes.rb
pageflow-0.7.1 config/routes.rb
pageflow-0.7.0 config/routes.rb