Skip to content

Instantly share code, notes, and snippets.

@mattsoutherden
Created August 6, 2010 09:10
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 mattsoutherden/511076 to your computer and use it in GitHub Desktop.
Save mattsoutherden/511076 to your computer and use it in GitHub Desktop.
class FbappController < ApplicationController
helper :google_optimizer
skip_before_filter :invitation_or_login_required, :only => [:index]
layout 'fb_app'
def index
if @user
return redirect_to '/fb_error'
end
@new_user = User.new
if request.post?
create_or_update_user_from_params
if @new_user.errors.empty?
return redirect_to '/fb_congrats'
end
end
end
def fb_error
end
def fb_congrats
if @user
@user_id = @user.id
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment