Sha256: a117b6b3a3e0a5e418cdd817c14c95798d43bee811933b61e6d0b2598dd849aa

Contents?: true

Size: 533 Bytes

Versions: 25

Compression:

Stored size: 533 Bytes

Contents

module Comee
  module Core
    class SuppliersController < ApplicationController
      include Common

      def index
        super do
          Supplier.includes(:currency).all
        end
      end

      def filter
        suppliers = Supplier.includes(:currency).ransack(params[:q]).result
        render_content(suppliers)
      end

      private

      def model_params
        params.require(:payload).permit(:code, :name, :address, :locale, :payment_terms, :currency_id, :vat_number, :tax_code)
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
comee_core-0.2.84 app/controllers/comee/core/suppliers_controller.rb
comee_core-0.2.83 app/controllers/comee/core/suppliers_controller.rb
comee_core-0.2.82 app/controllers/comee/core/suppliers_controller.rb
comee_core-0.2.81 app/controllers/comee/core/suppliers_controller.rb
comee_core-0.2.80 app/controllers/comee/core/suppliers_controller.rb