Select records and fill hash
I think you can optimize it like :

def fill_attributes()
  if (!$array[:status_id])
    $array[:status_id] = @customer.status_id
    $array[:status]= get_attribute_name('status',$array[:status_id] )
  end

  if (!$array[:color_id])
    $array[:color_id] = @customer.color_id
    $array[:color]= get_attribute_name('color',$array[:color_id] )
  end

end 

Private

def get_attribute_name(relator, relator_id)
  relator = relator.classify.constantize.find(relator_id)
  !relator.nil? ? relator.name : nil
end


Hope this will help you .