Sha256: 05b2a17e21907e29cd93dff75435ebd21c7623e0afbbe2242256571b78d80496

Contents?: true

Size: 954 Bytes

Versions: 9

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
  ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_edit] = :get
  ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_update] = :post
  ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_new] = :get
  ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_create] = :post
  ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_add] = :get
  #not working because routing picks show route instead
  #ActionDispatch::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]
  ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_destroy] = :delete
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
active_scaffold_batch-3.4.0 lib/active_scaffold_batch/config/core.rb
active_scaffold_batch-3.3.4 lib/active_scaffold_batch/config/core.rb
active_scaffold_batch-3.3.3 lib/active_scaffold_batch/config/core.rb
active_scaffold_batch-3.3.2 lib/active_scaffold_batch/config/core.rb
active_scaffold_batch-3.3.1 lib/active_scaffold_batch/config/core.rb
active_scaffold_batch-3.3.0 lib/active_scaffold_batch/config/core.rb
active_scaffold_batch-3.2.2 lib/active_scaffold_batch/config/core.rb
active_scaffold_batch-3.2.1 lib/active_scaffold_batch/config/core.rb
active_scaffold_batch-3.2.0 lib/active_scaffold_batch/config/core.rb