{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/26341","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/26341/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/26341/comments","events_url":"https://api.github.com/repos/rails/rails/issues/26341/events","html_url":"https://github.com/rails/rails/issues/26341","id":174276895,"number":26341,"title":"to_json should support parameterized methods","user":{"login":"vikramjadon921995","id":7978241,"avatar_url":"https://avatars.githubusercontent.com/u/7978241?v=3","gravatar_id":"","url":"https://api.github.com/users/vikramjadon921995","html_url":"https://github.com/vikramjadon921995","followers_url":"https://api.github.com/users/vikramjadon921995/followers","following_url":"https://api.github.com/users/vikramjadon921995/following{/other_user}","gists_url":"https://api.github.com/users/vikramjadon921995/gists{/gist_id}","starred_url":"https://api.github.com/users/vikramjadon921995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vikramjadon921995/subscriptions","organizations_url":"https://api.github.com/users/vikramjadon921995/orgs","repos_url":"https://api.github.com/users/vikramjadon921995/repos","events_url":"https://api.github.com/users/vikramjadon921995/events{/privacy}","received_events_url":"https://api.github.com/users/vikramjadon921995/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-31T13:44:04Z","updated_at":"2016-08-31T14:28:58Z","closed_at":"2016-08-31T14:28:58Z","body":"### Expected behavior\r\nto_json should should support parameterized methods. \r\nI am assuming something like this \r\n@company.to_json(methods: :is_watchlisted(user))\r\n\r\n### Actual behavior\r\nCurrently this is throwing syntax error. \r\nSyntaxError: unexpected ')', expecting end-of-input\r\nCompany.first.to_json(methods: :is_watchlisted?(User.first))\r\n"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/243782018","html_url":"https://github.com/rails/rails/issues/26341#issuecomment-243782018","issue_url":"https://api.github.com/repos/rails/rails/issues/26341","id":243782018,"user":{"login":"sgrif","id":1529387,"avatar_url":"https://avatars.githubusercontent.com/u/1529387?v=3","gravatar_id":"","url":"https://api.github.com/users/sgrif","html_url":"https://github.com/sgrif","followers_url":"https://api.github.com/users/sgrif/followers","following_url":"https://api.github.com/users/sgrif/following{/other_user}","gists_url":"https://api.github.com/users/sgrif/gists{/gist_id}","starred_url":"https://api.github.com/users/sgrif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgrif/subscriptions","organizations_url":"https://api.github.com/users/sgrif/orgs","repos_url":"https://api.github.com/users/sgrif/repos","events_url":"https://api.github.com/users/sgrif/events{/privacy}","received_events_url":"https://api.github.com/users/sgrif/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T14:28:58Z","updated_at":"2016-08-31T14:28:58Z","body":"It's giving you a syntax error because the code you posted isn't valid Ruby."}}
{"actor":{"display_login":"sgrif"}}