Sha256: 2f6e411ff809c9493744bb3e96acfc622a0983162e40c99af6ddc4e9af176c14
Contents?: true
Size: 530 Bytes
Versions: 10
Compression:
Stored size: 530 Bytes
Contents
module Comee module Core class ProductLookup < ApplicationRecord belongs_to :product belongs_to :itemable, polymorphic: true validates :code, :item_description, presence: true validates :code, uniqueness: {scope: %i[product_id itemable_id itemable_type]} def self.ransackable_attributes(_auth_object = nil) %w[id code item_description itemable_id itemable_type product_id] end def self.ransackable_associations(_auth_object = nil) [] end end end end
Version data entries
10 entries across 10 versions & 1 rubygems