lib/config_scripts/seeds/seed_type.rb
# This method gets the value that we will assign to an attribute for an
# association.
#
# This will remove as many entries from the identifier as it needs to get
# the value.
#
# @param [Symbol] attribute
#   The name of the association.
#
# @param [Array<String>] identifier
#   The components of the seed identifier.
#
# @return [ActiveRecord::Base]
This method gets the value that we will assign to an attribute for an
association.

This will remove as many entries from the identifier as it needs to get
the value.
This method gets the value that we will assign to an attribute for an association . This will remove as many entries from the identifier as it needs to get the value .
def read_value_for_association(attribute, identifier)
        klass = @associations[attribute]
        unless klass
          class_name = identifier.shift
          klass = class_name.constantize
        end
        value = self.seed_set.record_for_seed_identifier(klass, identifier)
      end
def read_value_for_association ( attribute , identifier ) klass = @associations [ attribute ] unless klass class_name = identifier . shift klass = class_name . constantize end value = self . seed_set . record_for_seed_identifier ( klass , identifier ) end
This method gets the value that we will assign to an attribute for an
association.
This method gets the value that we will assign to an attribute for an association .
None
ActiveRecord::Base
attribute
<not_specific>
identifier
<not_specific>
<not_specific>
identifier The components of the seed identifier.
identifier The components of the seed identifier .