method

id_for_database

rails latest stable - Class: ActiveRecord::AttributeMethods::CompositePrimaryKey

Method not available on this version

This method is only available on newer versions. The first available version (v7.2.3) is shown here.

id_for_database()
public

No documentation available.

# File activerecord/lib/active_record/attribute_methods/composite_primary_key.rb, line 75
      def id_for_database # :nodoc:
        if self.class.composite_primary_key?
          @primary_key.map { |col| @attributes[col].value_for_database }
        else
          super
        end
      end