blob: 6b2ff826bdec888578bdba46382a52ceeb02172b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
# SPDX-FileCopyrightText: 2020 IN COMMON Collective <collective@incommon.cc>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
module AgentsHelper
# Form to select an Agent
def agent_selector_form
form_for current_agent, url: '/my/current_agent', method: :patch do |f|
f.submit('select')
f.select(:id, options_for_select(current_user.agents.map { |a| [a.name, a.id] }), selected: current_agent.id)
end
end
end
|