Skip to content

Instantly share code, notes, and snippets.

@omgitsads
Forked from caius/gist:157252
Created July 28, 2009 13:09
Show Gist options
  • Save omgitsads/157258 to your computer and use it in GitHub Desktop.
Save omgitsads/157258 to your computer and use it in GitHub Desktop.
class SecureController < ApplicationController
layout 'secure'
def booking
@secure = Secure.new
return unless request.post?
@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