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



8
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
# File 'lib/hyrax/rails/routes.rb', line 8

def curation_concerns_basic_routes(&block)
  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 :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: [:new, :create], path: 'container/:parent_id/file_sets'
    resources :file_sets, only: [:show, :edit, :update, :destroy] do
      member do
        get :versions
        put :rollback
      end
    end
  end
end

#curation_concerns_embargo_managementObject



49
50
51
52
# File 'lib/hyrax/rails/routes.rb', line 49

def curation_concerns_embargo_management
  # routes moved to config/routes.rb
  Deprecation.warn(self, '#curation_concerns_embargo_management is deprecated and has no effect. It will be removed in Hyrax 3.0')
end