-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update via JSON #13
Comments
Currently, Topaz doesn't have |
What I thought is somehing like this. class JsonSample < Topaz::Model
columns(name: String)
end
JsonSample.create(name: "OK")
json_sample = JsonSample.find(1) # The name of this is "OK"
json_sample.update(%({"name": "NG"}))
puts JsonSample.find(1).name # => "NG" |
Yes, I like it. I've been trying to think what kind of Object it would need to be Also I've been trying to think of how it would work (how to implement it). I'd have to experiment a bit before I can come up with an implementation. |
I've invited you as Topaz collaborator. |
How do you update an existing model from JSON? I can't seem to figure out the use of
from_json
andupdate
with this.The text was updated successfully, but these errors were encountered: