Skip to content

Instantly share code, notes, and snippets.

@dbarrionuevo
Created November 18, 2013 15:35
Show Gist options
  • Save dbarrionuevo/7529801 to your computer and use it in GitHub Desktop.
Save dbarrionuevo/7529801 to your computer and use it in GitHub Desktop.
# app/controllers/sessions_controllers.rb
def login
url = "/auth/facebook"
url += "?" + params.try(:to_param) if params
session[:from] = params[:to] if params.any?
redirect_to url #unless user_signed_in?
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment