{"action":"created","issue":{"url":"https://api.github.com/repos/apotonick/reform/issues/223","labels_url":"https://api.github.com/repos/apotonick/reform/issues/223/labels{/name}","comments_url":"https://api.github.com/repos/apotonick/reform/issues/223/comments","events_url":"https://api.github.com/repos/apotonick/reform/issues/223/events","html_url":"https://github.com/apotonick/reform/issues/223","id":74220192,"number":223,"title":"Infer Representer from Reform::Form","user":{"login":"adrienbourgeois","id":5119543,"avatar_url":"https://avatars.githubusercontent.com/u/5119543?v=3","gravatar_id":"","url":"https://api.github.com/users/adrienbourgeois","html_url":"https://github.com/adrienbourgeois","followers_url":"https://api.github.com/users/adrienbourgeois/followers","following_url":"https://api.github.com/users/adrienbourgeois/following{/other_user}","gists_url":"https://api.github.com/users/adrienbourgeois/gists{/gist_id}","starred_url":"https://api.github.com/users/adrienbourgeois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrienbourgeois/subscriptions","organizations_url":"https://api.github.com/users/adrienbourgeois/orgs","repos_url":"https://api.github.com/users/adrienbourgeois/repos","events_url":"https://api.github.com/users/adrienbourgeois/events{/privacy}","received_events_url":"https://api.github.com/users/adrienbourgeois/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-05-08T04:01:04Z","updated_at":"2015-05-08T04:40:13Z","closed_at":null,"body":"I'm trying to get the Representer from a Reform::Form class but I cannot make it work. There is a class method \".representer_class\" in Reform::Form but when I do something like\r\n\r\n```ruby\r\nSongForm.representer_class.represent(Song.first).to_hash\r\n```\r\n\r\nit says something like:\r\n\r\n```\r\nNoMethodError: undefined method `to_hash' for #<Song:...>\r\n```\r\n\r\nWhile if I define the representer manually like so\r\n\r\n```ruby\r\nmodule SongRepresenter\r\n  include Representable::JSON\r\n  property :title\r\nend\r\n```\r\n\r\nand then I do:\r\n```ruby\r\nSongRepresenter.represent(Song.first).to_hash\r\n```\r\nit's working fine. Am I missing something?"},"comment":{"url":"https://api.github.com/repos/apotonick/reform/issues/comments/100098665","html_url":"https://github.com/apotonick/reform/issues/223#issuecomment-100098665","issue_url":"https://api.github.com/repos/apotonick/reform/issues/223","id":100098665,"user":{"login":"apotonick","id":10406,"avatar_url":"https://avatars.githubusercontent.com/u/10406?v=3","gravatar_id":"","url":"https://api.github.com/users/apotonick","html_url":"https://github.com/apotonick","followers_url":"https://api.github.com/users/apotonick/followers","following_url":"https://api.github.com/users/apotonick/following{/other_user}","gists_url":"https://api.github.com/users/apotonick/gists{/gist_id}","starred_url":"https://api.github.com/users/apotonick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apotonick/subscriptions","organizations_url":"https://api.github.com/users/apotonick/orgs","repos_url":"https://api.github.com/users/apotonick/repos","events_url":"https://api.github.com/users/apotonick/events{/privacy}","received_events_url":"https://api.github.com/users/apotonick/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T04:40:13Z","updated_at":"2015-05-08T04:40:13Z","body":"I updated the snippet."}}