-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set writeable dynamically? #40
Comments
How can I set |
You need two different twins, that's the idea, to treat different contexts (create vs. update) with different classes and not one big mess the way AR handles it (or doesn't). |
@apotonick
or
|
That should work for you. |
@adisos Reform doesn't care whether you use it for updating or creating things. It's your job as a software engineer to decide if you want to "hack" it (see last messages) or if you need a new contract to separate. I'd totally go with @timoschilling's solution if it was only one field, but extract a separate |
I tried @timoschilling solution but seems that it does not actually execute the lambda, did someone try it? Using disposable 0.4.4 |
How to set writeable dynamically? (with a block / lambda or...)
Tried these, all act as
writeable: true
no matter what's in the modelThanks!
The text was updated successfully, but these errors were encountered: