Skip to content

Instantly share code, notes, and snippets.

@jasdeepsingh
Created November 3, 2011 00:01
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 jasdeepsingh/1335357 to your computer and use it in GitHub Desktop.
Save jasdeepsingh/1335357 to your computer and use it in GitHub Desktop.
User Controller
class UsersController < ApplicationController
def create
@user = User.new(params[:user])
@fbUser = session[:fbUser]
if @user.save
flash[:notice] = "Success"
#redirect_to :action => "success"
redirect_to :root
else
flash[:error] = "The below errors prevented your request from being processed:"
#render :controller => 'oauth', :action => "user_form", :code => session[:code]
render :file => "../views/oauth/user_form.html.erb", :code => session[:code]
end
end
def success
#Success Action Goes Here
end
def failed
#Failed Acction goes here...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment