Sha256: 58c4589d36a4926af8313afd07c5c8548f79b1fc9d3503e5b0a53c3b662bce91

Contents?: true

Size: 436 Bytes

Versions: 89

Compression:

Stored size: 436 Bytes

Contents

module Comee
  module Core
    class Lookup < ApplicationRecord
      validates :code, :name, :lookup_type, presence: true
      validates :code, uniqueness: {scope: :lookup_type}

      def self.ransackable_attributes(_auth_object = nil)
        %w[
          id
          code
          name
          lookup_type
        ]
      end

      def self.ransackable_associations(_auth_object = nil)
        []
      end
    end
  end
end

Version data entries

89 entries across 89 versions & 1 rubygems

Version Path
comee_core-0.3.41 app/models/comee/core/lookup.rb
comee_core-0.3.40 app/models/comee/core/lookup.rb
comee_core-0.3.39 app/models/comee/core/lookup.rb
comee_core-0.3.38 app/models/comee/core/lookup.rb
comee_core-0.3.37 app/models/comee/core/lookup.rb
comee_core-0.3.36 app/models/comee/core/lookup.rb
comee_core-0.3.35 app/models/comee/core/lookup.rb
comee_core-0.3.34 app/models/comee/core/lookup.rb
comee_core-0.3.33 app/models/comee/core/lookup.rb
comee_core-0.3.32 app/models/comee/core/lookup.rb
comee_core-0.3.31 app/models/comee/core/lookup.rb
comee_core-0.3.30 app/models/comee/core/lookup.rb
comee_core-0.3.29 app/models/comee/core/lookup.rb
comee_core-0.3.28 app/models/comee/core/lookup.rb
comee_core-0.3.27 app/models/comee/core/lookup.rb
comee_core-0.3.26 app/models/comee/core/lookup.rb
comee_core-0.3.25 app/models/comee/core/lookup.rb
comee_core-0.3.24 app/models/comee/core/lookup.rb
comee_core-0.3.23 app/models/comee/core/lookup.rb
comee_core-0.3.22 app/models/comee/core/lookup.rb