# File lib/reactive_resource/base.rb, line 123
    def self.prefix_associations(options)
      options = options.dup
      used_associations = []
      parent_associations = []

      # Recurse to add the parent resource hierarchy. For Phone, for
      # instance, this will add the '/lawyers/:id' part of the URL,
      # which it knows about from the Address class.
      parents.each do |parent|
        parent_associations = parent.prefix_associations(options)
        break unless parent_associations.empty?
      end

      # The association chain we're following
      used_association = nil

      belongs_to_associations.each do |association|
        if !used_association && (association.associated_class.singleton? || param_value = options.delete("#{association.attribute}_id".intern)) # only take the first one
          used_associations << association
          break
        end
      end
      parent_associations + used_associations
    end