{"action":"created","issue":{"url":"https://api.github.com/repos/orgsync/active_interaction/issues/402","repository_url":"https://api.github.com/repos/orgsync/active_interaction","labels_url":"https://api.github.com/repos/orgsync/active_interaction/issues/402/labels{/name}","comments_url":"https://api.github.com/repos/orgsync/active_interaction/issues/402/comments","events_url":"https://api.github.com/repos/orgsync/active_interaction/issues/402/events","html_url":"https://github.com/orgsync/active_interaction/issues/402","id":189994383,"number":402,"title":"Support Procs as a filter","user":{"login":"ngan","id":16579,"avatar_url":"https://avatars.githubusercontent.com/u/16579?v=3","gravatar_id":"","url":"https://api.github.com/users/ngan","html_url":"https://github.com/ngan","followers_url":"https://api.github.com/users/ngan/followers","following_url":"https://api.github.com/users/ngan/following{/other_user}","gists_url":"https://api.github.com/users/ngan/gists{/gist_id}","starred_url":"https://api.github.com/users/ngan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngan/subscriptions","organizations_url":"https://api.github.com/users/ngan/orgs","repos_url":"https://api.github.com/users/ngan/repos","events_url":"https://api.github.com/users/ngan/events{/privacy}","received_events_url":"https://api.github.com/users/ngan/received_events","type":"User","site_admin":false},"labels":[{"id":45221851,"url":"https://api.github.com/repos/orgsync/active_interaction/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-17T09:49:22Z","updated_at":"2016-11-17T16:55:23Z","closed_at":null,"body":"Just wondering, has there even been any thoughts on support `proc` as a filter? e.g.\r\n\r\n```\r\nclass Foo < ActiveInteraction::Base\r\n  proc :my_callback, arity: 2\r\nend\r\n\r\nFoo.run(my_callback: ->(arg1, arg2) { ... })\r\n```\r\n\r\nI'm finding myself needing it right about now. :-)"},"comment":{"url":"https://api.github.com/repos/orgsync/active_interaction/issues/comments/261302690","html_url":"https://github.com/orgsync/active_interaction/issues/402#issuecomment-261302690","issue_url":"https://api.github.com/repos/orgsync/active_interaction/issues/402","id":261302690,"user":{"login":"ngan","id":16579,"avatar_url":"https://avatars.githubusercontent.com/u/16579?v=3","gravatar_id":"","url":"https://api.github.com/users/ngan","html_url":"https://github.com/ngan","followers_url":"https://api.github.com/users/ngan/followers","following_url":"https://api.github.com/users/ngan/following{/other_user}","gists_url":"https://api.github.com/users/ngan/gists{/gist_id}","starred_url":"https://api.github.com/users/ngan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngan/subscriptions","organizations_url":"https://api.github.com/users/ngan/orgs","repos_url":"https://api.github.com/users/ngan/repos","events_url":"https://api.github.com/users/ngan/events{/privacy}","received_events_url":"https://api.github.com/users/ngan/received_events","type":"User","site_admin":false},"created_at":"2016-11-17T16:55:23Z","updated_at":"2016-11-17T16:55:23Z","body":"When you say \"for use on the web\", do you mean to take inputs from only form params?\r\n\r\nWe've been using interactions for everything and it's been working great. Want to move this model's state from one to another? There's an interaction for that!\r\n\r\nOur models are merely for validation and state declarations. Providing an interaction for every task allows us to perform complex operations involving database table locking as well as calling many nested interactions that share the same principles. I wonder how many people are doing the same?\r\n\r\nYes, we do have interactions that take \"web inputs\" but we quickly coerce or mutate them into proper classes before passing them through to the nested interactions. For example: money is always passed through as an \"cents\" represented by an Integer. Once we get ahold of that input, the interaction changes it to a Money object before passing it along to other interactions.\r\n\r\nIf this is completely outside the scope of AI then I can understand that. But if you think AI can possibly go beyond just taking \"web inputs\" then it opens the door for a lot of cool things like project-custom filters."}}
{"actor":{"display_login":"ngan"}}