Class: Dbla::Routes
- Inherits:
-
Blacklight::Routes
- Object
- Blacklight::Routes
- Dbla::Routes
- Defined in:
- lib/dbla/routes.rb
Class Method Summary collapse
Instance Method Summary collapse
- #collection_routing(primary_resource) ⇒ Object
- #draw ⇒ Object
- #item_routing(primary_resource) ⇒ Object
Class Method Details
Instance Method Details
#collection_routing(primary_resource) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/dbla/routes.rb', line 31 def collection_routing(primary_resource) add_routes do || args = {only: [:show]} args[:constraints] = [:constraints] if [:constraints] resources :collection, args.merge(path: primary_resource, controller: primary_resource) do member do post "track" end end end end |
#draw ⇒ Object
13 14 15 16 |
# File 'lib/dbla/routes.rb', line 13 def draw item_routing(primary_resource) collection_routing(primary_resource) end |
#item_routing(primary_resource) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/dbla/routes.rb', line 18 def item_routing(primary_resource) add_routes do || args = {only: [:show]} args[:constraints] = [:constraints] if [:constraints] resources :item, args.merge(path: primary_resource, controller: primary_resource) do member do post "track" end end end end |