Created
June 24, 2012 15:02
-
-
Save daz-codes/2983577 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
post '/checkout' do | |
n = rand(3) | |
flash[:error] = "There was an error processing your payment" if n == 0 | |
flash[:success] = "Your payment was successful" if n > 0 | |
redirect to('/discount') if n == 2 | |
redirect to('/finish') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment