Sha256: 4c881a772ad3822aa47366d5e36131488d5f9b4794864b1cfbb42782fd8e8bd0

Contents?: true

Size: 503 Bytes

Versions: 24

Compression:

Stored size: 503 Bytes

Contents

module Comee
  module Core
    class Client < ApplicationRecord
      belongs_to :user, optional: true
      has_many :warehouse_shipments

      validates :code, :name, :address, :locale, presence: true
      validates :code, uniqueness: true

      delegate(:name, to: :user, prefix: true)

      def self.ransackable_attributes(_auth_object = nil)
        %w[
          user_id
          address
          code
          name
          discount
          locale
        ]
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
comee_core-0.1.65 app/models/comee/core/client.rb
comee_core-0.1.64 app/models/comee/core/client.rb
comee_core-0.1.63 app/models/comee/core/client.rb
comee_core-0.1.62 app/models/comee/core/client.rb
comee_core-0.1.61 app/models/comee/core/client.rb
comee_core-0.1.60 app/models/comee/core/client.rb
comee_core-0.1.59 app/models/comee/core/client.rb
comee_core-0.1.58 app/models/comee/core/client.rb
comee_core-0.1.57 app/models/comee/core/client.rb
comee_core-0.1.56 app/models/comee/core/client.rb
comee_core-0.1.55 app/models/comee/core/client.rb
comee_core-0.1.54 app/models/comee/core/client.rb
comee_core-0.1.53 app/models/comee/core/client.rb
comee_core-0.1.52 app/models/comee/core/client.rb
comee_core-0.1.51 app/models/comee/core/client.rb
comee_core-0.1.50 app/models/comee/core/client.rb
comee_core-0.1.49 app/models/comee/core/client.rb
comee_core-0.1.48 app/models/comee/core/client.rb
comee_core-0.1.47 app/models/comee/core/client.rb
comee_core-0.1.46 app/models/comee/core/client.rb