Sha256: c0e296e4a586d4c8ef8193a83243662800114c96c1560bb27e87f78bb26838b5
Contents?: true
Size: 742 Bytes
Versions: 6
Compression:
Stored size: 742 Bytes
Contents
module Comee module Core class ClientPricesController < ApplicationController include Comee::Core::Common def index super do client_prices = Comee::Core::ClientPrice.all client_prices.then(&paginate) end end def filter @client_prices = Comee::Core::ClientPrice.ransack(params[:q]).result @client_prices = @client_prices.then(&paginate) render json: {success: true, data: serialize(@client_prices)} end private def model_params params.require(:payload).permit(:valid_from, :valid_to, :price, :product_id, :discount, :client_id, :previous_price, :unit_id) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems