Class: ActionDispatch::Routing::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/hyrax/rails/routes.rb

Instance Method Summary collapse

Instance Method Details

#curation_concerns_basic_routes { ... } ⇒ Object

Examples:

curation_concerns_basic_routes do
  concerns :exportable
end

Yields:

  • If a block is passed it is yielded for each curation_concern



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/hyrax/rails/routes.rb', line 9

def curation_concerns_basic_routes(&block) # rubocop:disable Metrics/MethodLength
  resources :upload_sets, only: [:edit, :update]

  namespace :hyrax, path: :concern do
    namespaced_resources 'workflow_actions', only: [:update]
    concerns_to_route.each do |curation_concern_name|
      namespaced_resources curation_concern_name, except: [:index], &block
      namespaced_resources curation_concern_name, only: [] do
        member do
          get :manifest
          get :file_manager
          get :inspect_work
        end
      end
    end

    resources :parent, only: [] do
      concerns_to_route.each do |curation_concern_name|
        namespaced_resources curation_concern_name, except: [:index], &block
      end
    end

    resources :parent, only: [] do
      resources :file_sets, only: [:show]
    end

    resources :permissions, only: [] do
      member do
        get :confirm
        post :copy
      end
    end
    resources :file_sets, only: [:show, :edit, :update, :destroy] do
      member do
        get :versions
        put :rollback
      end
    end
  end
end