You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I'm trying to modify model's form for rails_admin but i'm not able to implement not find any tutorial on one simple thing. Can i somehow add an empty option for belongs_to field?
Let's say i have two models - Shop and User. User belongs_to Shop. If i will use field :shop in User rails_admin config, it gives me a widget with all available shops but i'm not able to not select any of them. There always needs to be one selected.
Thanks in advance for any clues!
The text was updated successfully, but these errors were encountered:
Actually this can be achieved by clearing out the search widget by repeatedly pressing the backspace key.
But I agree that it would be better to have a mouse-friendly way, like showing a ❌ button which clears the current selection.
Hello!
I'm trying to modify model's form for rails_admin but i'm not able to implement not find any tutorial on one simple thing. Can i somehow add an empty option for belongs_to field?
Let's say i have two models - Shop and User. User
belongs_to
Shop. If i will usefield :shop
inUser
rails_admin config, it gives me a widget with all available shops but i'm not able to not select any of them. There always needs to be one selected.Thanks in advance for any clues!
The text was updated successfully, but these errors were encountered: