{"action":"created","issue":{"url":"https://api.github.com/repos/rails/jbuilder/issues/283","labels_url":"https://api.github.com/repos/rails/jbuilder/issues/283/labels{/name}","comments_url":"https://api.github.com/repos/rails/jbuilder/issues/283/comments","events_url":"https://api.github.com/repos/rails/jbuilder/issues/283/events","html_url":"https://github.com/rails/jbuilder/issues/283","id":92905292,"number":283,"title":"array! with attributes and block at the same time","user":{"login":"clamoris","id":2946397,"avatar_url":"https://avatars.githubusercontent.com/u/2946397?v=3","gravatar_id":"","url":"https://api.github.com/users/clamoris","html_url":"https://github.com/clamoris","followers_url":"https://api.github.com/users/clamoris/followers","following_url":"https://api.github.com/users/clamoris/following{/other_user}","gists_url":"https://api.github.com/users/clamoris/gists{/gist_id}","starred_url":"https://api.github.com/users/clamoris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clamoris/subscriptions","organizations_url":"https://api.github.com/users/clamoris/orgs","repos_url":"https://api.github.com/users/clamoris/repos","events_url":"https://api.github.com/users/clamoris/events{/privacy}","received_events_url":"https://api.github.com/users/clamoris/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-03T16:27:23Z","updated_at":"2015-08-05T10:56:40Z","closed_at":null,"body":"It would be nice to have \r\n```ruby\r\n  json.array! @all_tests, :_id, :name  do |test|\r\n    json.is_current_user_owner test.owner == current_user\r\n  end\r\n```\r\ninstead of, \r\n\r\n```ruby\r\n  json.array! @all_tests  do |test|\r\n    json._id test._id\r\n    json.name test.name\r\n\r\n    json.is_current_user_owner test.owner == current_user\r\n  end\r\n```\r\n\r\nespecially for large objects with many attributes\r\n"},"comment":{"url":"https://api.github.com/repos/rails/jbuilder/issues/comments/127955007","html_url":"https://github.com/rails/jbuilder/issues/283#issuecomment-127955007","issue_url":"https://api.github.com/repos/rails/jbuilder/issues/283","id":127955007,"user":{"login":"vincentwoo","id":613320,"avatar_url":"https://avatars.githubusercontent.com/u/613320?v=3","gravatar_id":"","url":"https://api.github.com/users/vincentwoo","html_url":"https://github.com/vincentwoo","followers_url":"https://api.github.com/users/vincentwoo/followers","following_url":"https://api.github.com/users/vincentwoo/following{/other_user}","gists_url":"https://api.github.com/users/vincentwoo/gists{/gist_id}","starred_url":"https://api.github.com/users/vincentwoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincentwoo/subscriptions","organizations_url":"https://api.github.com/users/vincentwoo/orgs","repos_url":"https://api.github.com/users/vincentwoo/repos","events_url":"https://api.github.com/users/vincentwoo/events{/privacy}","received_events_url":"https://api.github.com/users/vincentwoo/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T10:56:40Z","updated_at":"2015-08-05T10:56:40Z","body":"I dunno if I'm keen on additional magic here. Is the new form of `array!` worth the confusion? The typical approach here seems more rubyish (less surprising):\r\n\r\n```ruby\r\n json.array! @all_tests do |test|\r\n    json.extract! test, :_id, :name\r\n    json.is_current_user_owner test.owner == current_user\r\n  end\r\n```"}}