declarative
declarative copied to clipboard
Use Uber::Options for definition options?
Is there a reason it is not possible to use Uber::Options
for definition options? If I'm not mistaken, this would allow, for instance, to do the following in Reform:
property :title, writeable: -> { model.my_condition? }
I achieved this in my app by overriding sync_options
in my form and calling Uber::Option
manually, but it would be cool to just have it embedded in the gem (and any other gems using Declarative).
If there's interest, I can try to submit a PR.
@apotonick any chance you could jot down your thoughts on this?
Hi @aldesantis - is that specific to Reform?
@apotonick well, I guess generic schema definitions could benefit from it as well, but the use case I have is :writeable
. Not sure where we'd want to do this exactly.
Ah ok. I'm currently working on transform (replacement for Reform) so I'm happy to merge anything into Reform!