Class: SolidAgents::AgentsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/solid_agents/agents_controller.rb

Instance Method Summary collapse

Instance Method Details

#edit ⇒ Object



13
# File 'app/controllers/solid_agents/agents_controller.rb', line 13

def edit; end

#index ⇒ Object



7
8
9
# File 'app/controllers/solid_agents/agents_controller.rb', line 7

def index
  @agents = SolidAgents::Agent.order(:key)
end

#show ⇒ Object



11
# File 'app/controllers/solid_agents/agents_controller.rb', line 11

def show; end

#update ⇒ Object



15
16
17
18
19
20
21
# File 'app/controllers/solid_agents/agents_controller.rb', line 15

def update
  if @agent.update(agent_params)
    redirect_to agent_path(@agent), notice: "Agent updated."
  else
    render :edit, status: :unprocessable_entity
  end
end