Created
April 12, 2013 05:14
-
-
Save benhoskings/5369577 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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