Skip to content

Instantly share code, notes, and snippets.

@benhoskings
Created April 12, 2013 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benhoskings/5369577 to your computer and use it in GitHub Desktop.
Save benhoskings/5369577 to your computer and use it in GitHub Desktop.
def some_action
redirect_to wizard_path_for(@intervention)
end
def wizard_path_for(intervention)
case intervention.wizard
when 100
intervention_expiries_path(intervention)
when 80
intervention_clients_path(intervention)
when 70
edit_intervention_path(intervention)
when 60
intervention_client_path(intervention, intervention.clients.contact)
when 50
intervention_followups_path(intervention)
when 40
intervention_referrals_path(intervention)
when 30
intervention_notes_path(intervention)
when 10
edit_intervention_path(intervention)
else
intervention_path(intervention)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment