Skip to content

Instantly share code, notes, and snippets.

@ehrenmurdick
Created February 27, 2012 22:47
Show Gist options
  • Save ehrenmurdick/1927680 to your computer and use it in GitHub Desktop.
Save ehrenmurdick/1927680 to your computer and use it in GitHub Desktop.
activity_sequence
Actions = [PersonalValues, PersonActions, SomeOther]
Locations = [first_action_path, second_action_path, third_action_path]
def next_activity(thing)
Locations[Actions.index(thing.class) + 1]
end
def prev_activity(thing)
Locations[Actions.index(thing.class) - 1]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment