lib/ecm/downloads/routing.rb in ecm_downloads2-1.2.2 vs lib/ecm/downloads/routing.rb in ecm_downloads2-2.0.0
- old
+ new
@@ -7,20 +7,18 @@
# Ecm::Downloads::Routing.routes(self, { :download_category_actions => [ :show ]})
#
# This will only create the show action for download categories, but omit the index action.
def self.routes(router, options = {})
options.reverse_merge!(
- { :download_category_actions => [:index, :show],
- :download_actions => [:index, :show],
- :add_download_member_action => false
- }
+ download_category_actions: [:index, :show],
+ download_actions: [:index, :show],
+ add_download_member_action: false
)
- router.resources :ecm_downloads_download_categories, :only => options[:download_category_actions], :controller => 'ecm/downloads/download_categories'
- router.resources :ecm_downloads_downloads, :only => options[:download_actions], :controller => 'ecm/downloads/downloads' do
- router.get :download, :on => :member, :if => options[:add_download_member_action]
- end # router.resources :ecm_downloads_downloads
- end # def
- end # class Routing
- end # module Downloads
-end # module Ecm
-
+ router.resources :ecm_downloads_download_categories, only: options[:download_category_actions], controller: 'ecm/downloads/download_categories'
+ router.resources :ecm_downloads_downloads, only: options[:download_actions], controller: 'ecm/downloads/downloads' do
+ router.get :download, on: :member, if: options[:add_download_member_action]
+ end
+ end
+ end
+ end
+end