def update
    @config_var = ConfigVar.where(name: params[:config_var][:name]).first
    unless @config_var
      @config_var = ConfigVar.new update_params[:config_var]
    end

    respond_to do |format|
      success = if @config_var.new_record?
        @config_var.save
      else
        @config_var.update_attributes update_params[:config_var]
      end
      if success
        format.html do
          redirect_to config_vars_url,
              notice: 'Configuration variable was successfully updated.'
        end
      else
        format.html { render action: :edit }
      end
    end
  end
def update
    @config_var = ConfigVar.where(name: params[:config_var][:name]).first
    unless @config_var
      @config_var = ConfigVar.new update_params[:config_var]
    end

    respond_to do |format|
      success = if @config_var.new_record?
        @config_var.save
      else
        @config_var.update_attributes update_params[:config_var]
      end
      if success
        format.html do
          redirect_to config_vars_url,
              notice: 'Configuration variable was successfully updated.'
        end
      else
        format.html { render action: :edit }
      end
    end
  end
PUT /config_vars/http_user