def obsolete_and_new(changes = { })
      return if changes.empty?
      if changes['new'].present?
        changes['new'].each { |name, _| ForemanChef::Environment.create(:name => name, :chef_proxy_id => @chef_proxy.id) }
      end
      if changes['obsolete'].present?
        changes['obsolete'].each { |name, _| ForemanChef::Environment.where(:chef_proxy_id => @chef_proxy.id).find_by_name(name).destroy }
      end
      []
    end
def obsolete_and_new(changes = { })
      return if changes.empty?
      if changes['new'].present?
        changes['new'].each { |name, _| ForemanChef::Environment.create(:name => name, :chef_proxy_id => @chef_proxy.id) }
      end
      if changes['obsolete'].present?
        changes['obsolete'].each { |name, _| ForemanChef::Environment.where(:chef_proxy_id => @chef_proxy.id).find_by_name(name).destroy }
      end
      []
    end
Update the environments based upon the user's selection
 +changes+ : Hash with two keys: :new and :obsolete.
               changed[:/new|obsolete/] is and Array of Strings
 Returns   : Array of Strings containing all record errors