Skip to content

Instantly share code, notes, and snippets.

@barsukov
Last active August 29, 2015 13:58
Show Gist options
  • Save barsukov/cbfb5aefb5e8144af70f to your computer and use it in GitHub Desktop.
Save barsukov/cbfb5aefb5e8144af70f to your computer and use it in GitHub Desktop.
quick get all names from custom state machine (gem state machine)
def available_types
ClassName.state_machines[:message_type].states.map &:name
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment