Sha256: 4b038f7aafb9c93d05f84dc9a1df105143ec67955ce60cc885789a69c3fad51f
Contents?: true
Size: 695 Bytes
Versions: 3
Compression:
Stored size: 695 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, :status, :product_id, :discount, :client_id, :previous_price, :unit_id) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems