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!
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_toShop. If i will usefield :shopinUserrails_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!