{"action":"created","issue":{"url":"https://api.github.com/repos/state-machines/state_machines/issues/66","repository_url":"https://api.github.com/repos/state-machines/state_machines","labels_url":"https://api.github.com/repos/state-machines/state_machines/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/state-machines/state_machines/issues/66/comments","events_url":"https://api.github.com/repos/state-machines/state_machines/issues/66/events","html_url":"https://github.com/state-machines/state_machines/issues/66","id":319560930,"node_id":"MDU6SXNzdWUzMTk1NjA5MzA=","number":66,"title":"fire_state_event!","user":{"login":"gagalago","id":519226,"node_id":"MDQ6VXNlcjUxOTIyNg==","avatar_url":"https://avatars1.githubusercontent.com/u/519226?v=4","gravatar_id":"","url":"https://api.github.com/users/gagalago","html_url":"https://github.com/gagalago","followers_url":"https://api.github.com/users/gagalago/followers","following_url":"https://api.github.com/users/gagalago/following{/other_user}","gists_url":"https://api.github.com/users/gagalago/gists{/gist_id}","starred_url":"https://api.github.com/users/gagalago/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gagalago/subscriptions","organizations_url":"https://api.github.com/users/gagalago/orgs","repos_url":"https://api.github.com/users/gagalago/repos","events_url":"https://api.github.com/users/gagalago/events{/privacy}","received_events_url":"https://api.github.com/users/gagalago/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-02T13:51:10Z","updated_at":"2018-06-26T05:48:42Z","closed_at":null,"author_association":"NONE","body":"I can't find the bang version of `fire_state_event` (throw error instead of returning false). What is the best way to add this feature?"},"comment":{"url":"https://api.github.com/repos/state-machines/state_machines/issues/comments/400186579","html_url":"https://github.com/state-machines/state_machines/issues/66#issuecomment-400186579","issue_url":"https://api.github.com/repos/state-machines/state_machines/issues/66","id":400186579,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDE4NjU3OQ==","user":{"login":"oehlschl","id":721402,"node_id":"MDQ6VXNlcjcyMTQwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/721402?v=4","gravatar_id":"","url":"https://api.github.com/users/oehlschl","html_url":"https://github.com/oehlschl","followers_url":"https://api.github.com/users/oehlschl/followers","following_url":"https://api.github.com/users/oehlschl/following{/other_user}","gists_url":"https://api.github.com/users/oehlschl/gists{/gist_id}","starred_url":"https://api.github.com/users/oehlschl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oehlschl/subscriptions","organizations_url":"https://api.github.com/users/oehlschl/orgs","repos_url":"https://api.github.com/users/oehlschl/repos","events_url":"https://api.github.com/users/oehlschl/events{/privacy}","received_events_url":"https://api.github.com/users/oehlschl/received_events","type":"User","site_admin":false},"created_at":"2018-06-26T05:48:42Z","updated_at":"2018-06-26T05:48:42Z","author_association":"NONE","body":"Found the implementation of implicit / attribute-based state transitions here: https://github.com/state-machines/state_machines/blob/c94d6908ff2a005604da60bb51f0f41187e006bb/lib/state_machines/machine.rb#L1051-L1051\r\n\r\nIt looks like there are some caveats with implicit transitions documented elsewhere: https://github.com/state-machines/state_machines/blob/c94d6908ff2a005604da60bb51f0f41187e006bb/lib/state_machines/machine.rb#L1204-L1204\r\n\r\nI didn't see any support for passing arguments (ex: an attribute like `state_event_arguments`), and adding this as an additional attribute seems messy.\r\n\r\nTherefore I would also be in favor of defining a `.fire!()` method, possibly via a special argument to .fire(), and rewriting `Event.add_actions` to leverage that instead: https://github.com/state-machines/state_machines/blob/a8e18f614d81c024437a87f12f091e6b0c62a5f8/lib/state_machines/event.rb#L224-L224"}}
{"actor":{"display_login":"oehlschl"}}