Module: CafeCar::Routing

Extended by:
ActiveSupport::Concern
Defined in:
lib/cafe_car/routing.rb

Instance Method Summary collapse

Instance Method Details

#resources(concerns: []) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/cafe_car/routing.rb', line 5

def resources(*, concerns: [], **, &)
  @concerns[:batchable] || begin
    concern :batchable do
      collection do
        patch :update_all
      end
    end
  end

  super(*, **, concerns: [ :batchable, *concerns ], &)
end