-
-
Save wflanagan/5f73eab4dfdd93aadf74d98fa4c62ba5 to your computer and use it in GitHub Desktop.
ActiveAdmin how to do a simple select dropdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://cl.ly/70b58bd4605d/Image%202019-02-20%20at%201.55.28%20PM.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
panel "Send Chat Message" do | |
form action: "/admin/subscribers/#{resource.id}/send_message", method: :post do |f| | |
div do | |
f.select 'Bot', :bot_id, :collection => resource.bots.collect {|bot| [bot.name, bot.id]} | |
end | |
div do | |
f.text_area :text, nil, as: :text, placeholder: 'Enter your text message' | |
end | |
div do | |
f.input :submit, type: :submit | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment