Sha256: de533e73d6e4b69698c83e6e417524221551366ea7752df7c44518538502b3a3
Contents?: true
Size: 686 Bytes
Versions: 28
Compression:
Stored size: 686 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 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
28 entries across 28 versions & 1 rubygems