{"action":"created","issue":{"url":"https://api.github.com/repos/apotonick/reform/issues/107","repository_url":"https://api.github.com/repos/apotonick/reform","labels_url":"https://api.github.com/repos/apotonick/reform/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/apotonick/reform/issues/107/comments","events_url":"https://api.github.com/repos/apotonick/reform/issues/107/events","html_url":"https://github.com/apotonick/reform/issues/107","id":37412316,"number":107,"title":"Make a form pretend to be an ActiveModel?","user":{"login":"mgraham","id":98847,"avatar_url":"https://avatars.githubusercontent.com/u/98847?v=3","gravatar_id":"","url":"https://api.github.com/users/mgraham","html_url":"https://github.com/mgraham","followers_url":"https://api.github.com/users/mgraham/followers","following_url":"https://api.github.com/users/mgraham/following{/other_user}","gists_url":"https://api.github.com/users/mgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/mgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgraham/subscriptions","organizations_url":"https://api.github.com/users/mgraham/orgs","repos_url":"https://api.github.com/users/mgraham/repos","events_url":"https://api.github.com/users/mgraham/events{/privacy}","received_events_url":"https://api.github.com/users/mgraham/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2014-07-08T21:09:52Z","updated_at":"2016-02-05T21:00:10Z","closed_at":null,"body":"I'm trying to use Active Admin, and it expects all validation to be in the model.\r\n\r\nThere's an issue open with them where they say that the form only has to quack like an  ActiveModel in order to work:\r\n\r\nhttps://github.com/gregbell/active_admin/issues/2429\r\n\r\nI first tried passing in a Reform::Form class directly:\r\n\r\n```\r\nActiveAdmin.register ProgramForm, as: \"Program\" do\r\n    # ...\r\nend\r\n```\r\n...but Active Admin complains that `column_names` is not defined.  And I'm sure that's not going to be the only issue.\r\n\r\nSo I tried making a wrapper around the Reform::Form object to provide the methods that Active Admin wants, but I got stumped right away trying to implement `column_names`, because there does not appear to be a way to extract the properties from a Reform::Form after it is created.\r\n\r\nAny ideas on how to make some sort of proxy object that takes a Reform::Form (or a Reform::Contract), and a model, and then makes it behave like a regular ActiveModel instance?\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apotonick/reform/issues/comments/180552722","html_url":"https://github.com/apotonick/reform/issues/107#issuecomment-180552722","issue_url":"https://api.github.com/repos/apotonick/reform/issues/107","id":180552722,"user":{"login":"samstickland","id":9951571,"avatar_url":"https://avatars.githubusercontent.com/u/9951571?v=3","gravatar_id":"","url":"https://api.github.com/users/samstickland","html_url":"https://github.com/samstickland","followers_url":"https://api.github.com/users/samstickland/followers","following_url":"https://api.github.com/users/samstickland/following{/other_user}","gists_url":"https://api.github.com/users/samstickland/gists{/gist_id}","starred_url":"https://api.github.com/users/samstickland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samstickland/subscriptions","organizations_url":"https://api.github.com/users/samstickland/orgs","repos_url":"https://api.github.com/users/samstickland/repos","events_url":"https://api.github.com/users/samstickland/events{/privacy}","received_events_url":"https://api.github.com/users/samstickland/received_events","type":"User","site_admin":false},"created_at":"2016-02-05T21:00:10Z","updated_at":"2016-02-05T21:00:10Z","body":"I notice this is still open, but also that this Gem exists which appears to solve the same problem:\r\n\r\nhttps://github.com/bolshakov/activeadmin-reform"}}