{"action":"closed","issue":{"url":"https://api.github.com/repos/lotus/model/issues/170","labels_url":"https://api.github.com/repos/lotus/model/issues/170/labels{/name}","comments_url":"https://api.github.com/repos/lotus/model/issues/170/comments","events_url":"https://api.github.com/repos/lotus/model/issues/170/events","html_url":"https://github.com/lotus/model/issues/170","id":65768700,"number":170,"title":"Dirty checking for entities","user":{"login":"dsnipe","id":1488587,"avatar_url":"https://avatars.githubusercontent.com/u/1488587?v=3","gravatar_id":"","url":"https://api.github.com/users/dsnipe","html_url":"https://github.com/dsnipe","followers_url":"https://api.github.com/users/dsnipe/followers","following_url":"https://api.github.com/users/dsnipe/following{/other_user}","gists_url":"https://api.github.com/users/dsnipe/gists{/gist_id}","starred_url":"https://api.github.com/users/dsnipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsnipe/subscriptions","organizations_url":"https://api.github.com/users/dsnipe/orgs","repos_url":"https://api.github.com/users/dsnipe/repos","events_url":"https://api.github.com/users/dsnipe/events{/privacy}","received_events_url":"https://api.github.com/users/dsnipe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lotus/model/labels/feature","name":"feature","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":{"login":"jodosha","id":5089,"avatar_url":"https://avatars.githubusercontent.com/u/5089?v=3","gravatar_id":"","url":"https://api.github.com/users/jodosha","html_url":"https://github.com/jodosha","followers_url":"https://api.github.com/users/jodosha/followers","following_url":"https://api.github.com/users/jodosha/following{/other_user}","gists_url":"https://api.github.com/users/jodosha/gists{/gist_id}","starred_url":"https://api.github.com/users/jodosha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jodosha/subscriptions","organizations_url":"https://api.github.com/users/jodosha/orgs","repos_url":"https://api.github.com/users/jodosha/repos","events_url":"https://api.github.com/users/jodosha/events{/privacy}","received_events_url":"https://api.github.com/users/jodosha/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/lotus/model/milestones/6","html_url":"https://github.com/lotus/model/milestones/v0.3.1","labels_url":"https://api.github.com/repos/lotus/model/milestones/6/labels","id":1055838,"number":6,"title":"v0.3.1","description":"","creator":{"login":"jodosha","id":5089,"avatar_url":"https://avatars.githubusercontent.com/u/5089?v=3","gravatar_id":"","url":"https://api.github.com/users/jodosha","html_url":"https://github.com/jodosha","followers_url":"https://api.github.com/users/jodosha/followers","following_url":"https://api.github.com/users/jodosha/following{/other_user}","gists_url":"https://api.github.com/users/jodosha/gists{/gist_id}","starred_url":"https://api.github.com/users/jodosha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jodosha/subscriptions","organizations_url":"https://api.github.com/users/jodosha/orgs","repos_url":"https://api.github.com/users/jodosha/repos","events_url":"https://api.github.com/users/jodosha/events{/privacy}","received_events_url":"https://api.github.com/users/jodosha/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":5,"state":"open","created_at":"2015-04-07T09:12:17Z","updated_at":"2015-04-18T14:02:02Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-04-01T20:07:43Z","updated_at":"2015-04-18T14:02:02Z","closed_at":"2015-04-18T14:02:02Z","body":"Why not to implement dirty checking for entities?\r\n\r\nSomething like this:\r\n```ruby\r\nclass Article\r\n  include Lotus::Entity\r\n  attributes :title\r\nend\r\n\r\nrecord = Article.new(title: 'My title')\r\narticle.changed? # true\r\narticle = ArticleRepository.create(record)\r\narticle.changed? # false\r\n\r\narticle.title = 'New title'\r\narticle.changed? # true\r\narticle.changed_attributes # {:title => 'My title'}\r\n```\r\nI think to put all in 'entity' for now. \r\nMaybe any thoughts about it?"}}