Class: Cats::Core::InventoryAdjustmentsController

Inherits:
ApplicationController show all
Includes:
Common
Defined in:
app/controllers/cats/core/inventory_adjustments_controller.rb

Instance Method Summary collapse

Methods included from Common

#create, #index, #show, #update

Methods inherited from ApplicationController

#authenticate, #current_user, #skip_bullet

Instance Method Details

#commitObject



11
12
13
14
15
# File 'app/controllers/cats/core/inventory_adjustments_controller.rb', line 11

def commit
  adjustment = InventoryAdjustment.find(params[:id])
  adjustment.commit
  render json: {success: true, data: serialize(adjustment)}
end

#filterObject



6
7
8
9
# File 'app/controllers/cats/core/inventory_adjustments_controller.rb', line 6

def filter
  query = InventoryAdjustment.ransack(params[:q])
  render json: {success: true, data: serialize(query.result)}
end