declarative icon indicating copy to clipboard operation
declarative copied to clipboard

Use Uber::Options for definition options?

Open aldesantis opened this issue 6 years ago • 4 comments

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.

aldesantis avatar Dec 05 '17 16:12 aldesantis

@apotonick any chance you could jot down your thoughts on this?

aldesantis avatar Feb 10 '18 15:02 aldesantis

Hi @aldesantis - is that specific to Reform?

apotonick avatar Feb 12 '18 20:02 apotonick

@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.

aldesantis avatar Feb 12 '18 20:02 aldesantis

Ah ok. I'm currently working on transform (replacement for Reform) so I'm happy to merge anything into Reform!

apotonick avatar Feb 12 '18 20:02 apotonick