{"action":"opened","issue":{"url":"https://api.github.com/repos/influitive/inflorm/issues/1","labels_url":"https://api.github.com/repos/influitive/inflorm/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/influitive/inflorm/issues/1/comments","events_url":"https://api.github.com/repos/influitive/inflorm/issues/1/events","html_url":"https://github.com/influitive/inflorm/issues/1","id":108887285,"number":1,"title":"Cannot selectively update attributes on a model","user":{"login":"sachinsiby","id":1813269,"avatar_url":"https://avatars.githubusercontent.com/u/1813269?v=3","gravatar_id":"","url":"https://api.github.com/users/sachinsiby","html_url":"https://github.com/sachinsiby","followers_url":"https://api.github.com/users/sachinsiby/followers","following_url":"https://api.github.com/users/sachinsiby/following{/other_user}","gists_url":"https://api.github.com/users/sachinsiby/gists{/gist_id}","starred_url":"https://api.github.com/users/sachinsiby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sachinsiby/subscriptions","organizations_url":"https://api.github.com/users/sachinsiby/orgs","repos_url":"https://api.github.com/users/sachinsiby/repos","events_url":"https://api.github.com/users/sachinsiby/events{/privacy}","received_events_url":"https://api.github.com/users/sachinsiby/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-29T14:53:35Z","updated_at":"2015-09-29T14:53:35Z","closed_at":null,"body":"Because Inform defaults the attributes to `nil`, we are unable to selectively update attributes. i.e. you must pass in all of the attributes on the model.\r\n\r\ne.g.\r\n\r\n    class PersonForm\r\n      include Inflorm\r\n      attribute :name \r\n      attribute :age\r\n      attribute :gender\r\n    end\r\n\r\n`PersonForm.new(age: 27).to_h #=> {name: nil, age: 27, gender: nil}`\r\n\r\nSo when you do a `Person#update_attributes` in your `#persist!` method, it overwrites the existing `name` and `gender` attributes to null. This is problematic, especially if you have non-null constraints on your database. \r\n"}}