Class: ActionDispatch::Routing::Mapper
- Inherits:
-
Object
- Object
- ActionDispatch::Routing::Mapper
- Defined in:
- lib/worthwhile/rails/routes.rb
Instance Method Summary collapse
-
#worthwhile_collections ⇒ Object
Used in conjunction with Hydra::Collections::Engine routes.
- #worthwhile_curation_concerns ⇒ Object
- #worthwhile_embargo_management ⇒ Object
Instance Method Details
#worthwhile_collections ⇒ Object
Used in conjunction with Hydra::Collections::Engine routes. Adds routes for doing paginated searches within a collection’s contents
33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/worthwhile/rails/routes.rb', line 33 def worthwhile_collections resources :collections, only: :show do member do get 'page/:page', action: :index get 'facet/:id', action: :facet, as: :dashboard_facet end collection do put '', action: :update put :remove_member end end end |
#worthwhile_curation_concerns ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/worthwhile/rails/routes.rb', line 4 def worthwhile_curation_concerns resources :downloads, only: :show namespace :curation_concern, path: :concern do Worthwhile.configuration.registered_curation_concern_types.map(&:tableize).each do |curation_concern_name| namespaced_resources curation_concern_name, except: [:index] end resources :permissions, only: [] do member do get :confirm post :copy end end resources :linked_resources, only: [:new, :create], path: 'container/:parent_id/linked_resources' resources :linked_resources, only: [:show, :edit, :update, :destroy] resources :generic_files, only: [:new, :create], path: 'container/:parent_id/generic_files' resources :generic_files, only: [:show, :edit, :update, :destroy] do member do get :versions put :rollback end end end end |
#worthwhile_embargo_management ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/worthwhile/rails/routes.rb', line 46 def resources :embargoes, only: [:index, :edit, :destroy] do collection do patch :update end end resources :leases, only: [:index, :edit, :destroy] do collection do patch :update end end end |