aboutsummaryrefslogtreecommitdiff
path: root/app/helpers/agents_helper.rb
blob: a02fb7a849e8fcc21073cc852a2e8760638bc37c (plain)
1
2
3
4
5
6
7
8
9
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