Sha256: 915fe00c1bcccc23d31bc4c68ab5340cde970c526d7f206d06daf7464bd5ee3b

Contents?: true

Size: 698 Bytes

Versions: 9

Compression:

Stored size: 698 Bytes

Contents

require_dependency 'application_controller'

module Logistics
  module Core
    class ClientsController < ApplicationController

      include ControllerCommon
      include LookupList

      def index
        clients = Client.includes(:client_category, :country).order(:name)
        data = ApplicationRecord.as_json(clients)
        response = Mks::Common::MethodResponse.new(true, nil, data, nil)
        render json: response
      end


      private

      def model_params
        params.require(:client).permit(:name, :postal_code, :city, :country_id, :telephone, :fax, :email, :license, :tin,
                                       :client_category_id, :code)
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
logistics_core-21.11.2 app/controllers/logistics/core/clients_controller.rb
logistics_core-21.11.1 app/controllers/logistics/core/clients_controller.rb
logistics_core-21.08.1 app/controllers/logistics/core/clients_controller.rb
logistics_core-21.03.1 app/controllers/logistics/core/clients_controller.rb
logistics_core-20.10.3 app/controllers/logistics/core/clients_controller.rb
logistics_core-20.10.2 app/controllers/logistics/core/clients_controller.rb
logistics_core-20.10.1 app/controllers/logistics/core/clients_controller.rb
logistics_core-20.9.1 app/controllers/logistics/core/clients_controller.rb
logistics_core-20.8.1 app/controllers/logistics/core/clients_controller.rb