Class: Ecm::News::Routing

Inherits:
Object
  • Object
show all
Defined in:
lib/ecm/news/routing.rb

Class Method Summary collapse

Class Method Details

.routes(router, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/ecm/news/routing.rb', line 4

def self.routes(router, options = {})
  options.reverse_merge!(
    item_actions: [:index, :show]
  )

  router.resources :ecm_news_items, only: options[:item_actions],
                                    controller: 'ecm/news/items' do
    router.get 'page/:page', action: :index, on: :collection
  end
end