Class: Protege::AgentToolkitsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/protege/agent_toolkits_controller.rb

Overview

Manages a created toolkit grant — the page where you configure how one agent uses one toolkit: its proactive flag and its sender-gate rules (the rules nest under this via AgentToolkitRulesController). Top-level and keyed by the grant's own id, so nesting never goes two deep. Attaching/detaching grants lives in the nested Agents::AgentToolkitsController.

Instance Method Summary collapse

Instance Method Details

#showvoid

This method returns an undefined value.

Show the grant's configuration page (its toolkit's tools, proactive flag, and gate rules).



14
# File 'app/controllers/protege/agent_toolkits_controller.rb', line 14

def show; end

#updatevoid

This method returns an undefined value.

Update the grant's proactive flag. On failure, re-render its page.



19
20
21
22
23
24
25
# File 'app/controllers/protege/agent_toolkits_controller.rb', line 19

def update
  if @agent_toolkit.update(agent_toolkit_params)
    redirect_to agent_toolkit_path(@agent_toolkit), notice: 'Grant updated.'
  else
    render :show, status: :unprocessable_entity
  end
end