How do I setup a select dropdown in madmin? #250
Answered
by
excid3
jeffgipson
asked this question in
Q&A
-
I'm trying to create a select does anyone have an example? attribute :ai_platform, as: :select, options: -> { AiService.ai_platform_options } Then setting up a method in the model Thank you |
Beta Was this translation helpful? Give feedback.
Answered by
excid3
Jan 26, 2025
Replies: 1 comment 1 reply
-
attribute :ai_platform, as: :select, collection: AiService.ai_platform_options https://github.com/excid3/madmin/blob/main/lib/madmin/fields/select.rb#L5 It doesn't currently evaluate lambdas, but that would be a good feature to add. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jeffgipson
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/excid3/madmin/blob/main/lib/madmin/fields/select.rb#L5
It doesn't currently evaluate lambdas, but that would be a good feature to add.