Sha256: 193c77c1878063dc3be5997cbdd445e5df90975bc3a42c5a9e79af67a7bddc87

Contents?: true

Size: 954 Bytes

Versions: 5

Compression:

Stored size: 954 Bytes

Contents

# Need to open the AS module carefully due to Rails 2.3 lazy loading
ActiveScaffold::Config::Core.class_eval do
  ActiveScaffold::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_edit] = :get
  ActiveScaffold::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_update] = :post
  ActiveScaffold::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_new] = :get
  ActiveScaffold::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_create] = :post
  ActiveScaffold::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_add] = :get
  #not working because routing picks show route instead
  #ActiveScaffold::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_destroy] = :get
  #you may define a route for your controller before resource routes
  #match 'players/batch_destroy' => 'players#batch_destroy', :via => [:get]
  ActiveScaffold::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_destroy] = :delete
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
active_scaffold_batch-3.4.5 lib/active_scaffold_batch/config/core.rb
active_scaffold_batch-3.4.4 lib/active_scaffold_batch/config/core.rb
active_scaffold_batch-3.4.3 lib/active_scaffold_batch/config/core.rb
active_scaffold_batch-3.4.2 lib/active_scaffold_batch/config/core.rb
active_scaffold_batch-3.4.1 lib/active_scaffold_batch/config/core.rb