Sha256: 40a2c11e3b419528c0a6f97c534251aea69b9198eacc6d3c08577e4cf892f9a4
Contents?: true
Size: 901 Bytes
Versions: 35
Compression:
Stored size: 901 Bytes
Contents
module Comee module Core class Client < ApplicationRecord belongs_to :user, optional: true belongs_to :parent, class_name: "Comee::Core::Client", optional: true belongs_to :currency, optional: true has_and_belongs_to_many :contacts, join_table: :comee_core_clients_contacts has_and_belongs_to_many :agents, join_table: :comee_core_clients_agents has_many :client_warehouses validates :code, :name, :address, :locale, presence: true validates :code, uniqueness: true delegate(:name, to: :user, prefix: true, allow_nil: true) def self.ransackable_attributes(_auth_object = nil) %w[ id user_id address code name locale parent_id ] end def self.ransackable_associations(_auth_object = nil) ["parent"] end end end end
Version data entries
35 entries across 35 versions & 1 rubygems