{"action":"created","issue":{"url":"https://api.github.com/repos/thoughtbot/administrate/issues/421","repository_url":"https://api.github.com/repos/thoughtbot/administrate","labels_url":"https://api.github.com/repos/thoughtbot/administrate/issues/421/labels{/name}","comments_url":"https://api.github.com/repos/thoughtbot/administrate/issues/421/comments","events_url":"https://api.github.com/repos/thoughtbot/administrate/issues/421/events","html_url":"https://github.com/thoughtbot/administrate/issues/421","id":127496496,"number":421,"title":"Feature request: reading data attributes of a record","user":{"login":"janklimo","id":7811733,"avatar_url":"https://avatars.githubusercontent.com/u/7811733?v=3","gravatar_id":"","url":"https://api.github.com/users/janklimo","html_url":"https://github.com/janklimo","followers_url":"https://api.github.com/users/janklimo/followers","following_url":"https://api.github.com/users/janklimo/following{/other_user}","gists_url":"https://api.github.com/users/janklimo/gists{/gist_id}","starred_url":"https://api.github.com/users/janklimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janklimo/subscriptions","organizations_url":"https://api.github.com/users/janklimo/orgs","repos_url":"https://api.github.com/users/janklimo/repos","events_url":"https://api.github.com/users/janklimo/events{/privacy}","received_events_url":"https://api.github.com/users/janklimo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-19T17:23:31Z","updated_at":"2016-02-14T01:02:15Z","closed_at":"2016-01-30T19:59:46Z","body":"Assuming I have an `Event` that `has _many` attendees and a given `capacity`, is there any way I can have a column on the `Event` index page showing spots available? Something like:\r\n\r\n    object.capacity - object.attendees.size "},"comment":{"url":"https://api.github.com/repos/thoughtbot/administrate/issues/comments/183783002","html_url":"https://github.com/thoughtbot/administrate/issues/421#issuecomment-183783002","issue_url":"https://api.github.com/repos/thoughtbot/administrate/issues/421","id":183783002,"user":{"login":"graysonwright","id":829576,"avatar_url":"https://avatars.githubusercontent.com/u/829576?v=3","gravatar_id":"","url":"https://api.github.com/users/graysonwright","html_url":"https://github.com/graysonwright","followers_url":"https://api.github.com/users/graysonwright/followers","following_url":"https://api.github.com/users/graysonwright/following{/other_user}","gists_url":"https://api.github.com/users/graysonwright/gists{/gist_id}","starred_url":"https://api.github.com/users/graysonwright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graysonwright/subscriptions","organizations_url":"https://api.github.com/users/graysonwright/orgs","repos_url":"https://api.github.com/users/graysonwright/repos","events_url":"https://api.github.com/users/graysonwright/events{/privacy}","received_events_url":"https://api.github.com/users/graysonwright/received_events","type":"User","site_admin":false},"created_at":"2016-02-14T01:02:15Z","updated_at":"2016-02-14T01:02:15Z","body":"This is the solution I had in mind. If you have a setter method like\r\n\r\n```ruby\r\ndef name=(value)\r\n  self.first_name = value.split.first\r\n  self.last_name = value.split.last\r\nend\r\n```\r\n\r\nthen you can use that in your form attributes, as well! woot. :smile: "}}