method

derive_primary_key

rails latest stable - Class: ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods
derive_primary_key(value)
private

No documentation available.

# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 172
            def derive_primary_key(value)
              return unless value

              return -value.to_s unless value.is_a?(Array)

              value.map { |v| -v.to_s }.freeze
            end