Sha256: 57d013aa8cd5f87353ecc12a652798934283afd6db1024dca81f400b8a37d008
Contents?: true
Size: 842 Bytes
Versions: 5
Compression:
Stored size: 842 Bytes
Contents
# -*- encoding : utf-8 -*- module Hydra module BatchEdit class Routes def initialize(router, options) @router = router @options = options end def draw add_routes do |options| resources :batch_edits, :only=>[:index] do member do delete :destroy end collection do get :index get :edit put :update delete :clear put :state put :all end end match 'batch_edits/:id' => 'batch_edits#add', :via=>:put match 'batch_edits' => 'batch_edits#destroy_collection', :via=>:delete end end protected def add_routes &blk @router.instance_exec(@options, &blk) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems