Sha256: dd8391ddf0766acb04f1cafae9bc81700ae571ea4fa9868189a1a9a034e993ca

Contents?: true

Size: 494 Bytes

Versions: 10

Compression:

Stored size: 494 Bytes

Contents

module Comee
  module Core
    class ClientPricesController < ApplicationController
      include Comee::Core::Common

      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)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
comee_core-0.1.29 app/controllers/comee/core/client_prices_controller.rb
comee_core-0.1.28 app/controllers/comee/core/client_prices_controller.rb
comee_core-0.1.27 app/controllers/comee/core/client_prices_controller.rb
comee_core-0.1.26 app/controllers/comee/core/client_prices_controller.rb
comee_core-0.1.25 app/controllers/comee/core/client_prices_controller.rb
comee_core-0.1.24 app/controllers/comee/core/client_prices_controller.rb
comee_core-0.1.23 app/controllers/comee/core/client_prices_controller.rb
comee_core-0.1.22 app/controllers/comee/core/client_prices_controller.rb
comee_core-0.1.21 app/controllers/comee/core/client_prices_controller.rb
comee_core-0.1.20 app/controllers/comee/core/client_prices_controller.rb