Skip to content

Instantly share code, notes, and snippets.

@caius
Forked from omgitsads/gist:157249
Created July 28, 2009 13:03
Show Gist options
  • Save caius/157252 to your computer and use it in GitHub Desktop.
Save caius/157252 to your computer and use it in GitHub Desktop.
class SecureController < ApplicationController
layout 'secure'
def booking
@secure = Secure.find(:first, :conditions => {
:email => params[:secure][:email],
:reference => params[:secure][:reference]
})
# Redirect if we have the data
redirect_to secure_booking2_path and return unless @secure.nil?
# Or show the stuff
flash[:warning] = "Booking not found"
@secure = Secure.new
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment