Sha256: acc4efd591b48791d3eb0a84969f3d2eebdb7ddec5a3180b1bf6bb6a8e986c57
Contents?: true
Size: 817 Bytes
Versions: 7
Compression:
Stored size: 817 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 match 'destroy' => 'batch_edits#destroy_collection', :via=>:delete get :edit put :update delete :clear put :state put :all end end match 'batch_edits/:id' => 'batch_edits#add', :via=>:put end end protected def add_routes &blk @router.instance_exec(@options, &blk) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems