{"action":"closed","issue":{"url":"https://api.github.com/repos/chaps-io/public_activity/issues/185","labels_url":"https://api.github.com/repos/chaps-io/public_activity/issues/185/labels{/name}","comments_url":"https://api.github.com/repos/chaps-io/public_activity/issues/185/comments","events_url":"https://api.github.com/repos/chaps-io/public_activity/issues/185/events","html_url":"https://github.com/chaps-io/public_activity/issues/185","id":46444314,"number":185,"title":"Wrong behaviour for boolean custom field with a default value","user":{"login":"NeverAgain","id":997474,"avatar_url":"https://avatars.githubusercontent.com/u/997474?v=3","gravatar_id":"","url":"https://api.github.com/users/NeverAgain","html_url":"https://github.com/NeverAgain","followers_url":"https://api.github.com/users/NeverAgain/followers","following_url":"https://api.github.com/users/NeverAgain/following{/other_user}","gists_url":"https://api.github.com/users/NeverAgain/gists{/gist_id}","starred_url":"https://api.github.com/users/NeverAgain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeverAgain/subscriptions","organizations_url":"https://api.github.com/users/NeverAgain/orgs","repos_url":"https://api.github.com/users/NeverAgain/repos","events_url":"https://api.github.com/users/NeverAgain/events{/privacy}","received_events_url":"https://api.github.com/users/NeverAgain/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-10-21T21:02:16Z","updated_at":"2015-10-21T00:19:23Z","closed_at":"2015-10-21T00:19:23Z","body":"When setting a default value in migration for a boolean custom field, the returned value is not boolean, but rather integer.\r\n\r\ne.g. when set the default value to be true, then query that field, the returned value is actually 1 instead of true. \r\n\r\nin the following case, unread is a custom boolean field with a true default value. \r\n\r\n    => PublicActivity::Activity.last.unread\r\n    PublicActivity::Activity Load (0.4ms)  SELECT `activities`.* FROM `activities` ORDER BY `activities`.`id` DESC LIMIT 1\r\n    => 1"}}