RailsCasts Pro episodes are now free!

Learn more or hide this

Stefan Schmidt's Profile

GitHub User: schlubbi

Site: www.yacto.com

Comments by Stefan Schmidt

Avatar

simply remove the following method, if you want to use alias_method. or remove the alias_method call

ruby
def linkedin
  user = User.from_omniauth(request.env["omniauth.auth"])
  if user.persisted?
    sign_in_and_redirect user
  else
    session["devise.user_attributes"] = user.attributes
    redirect_to new_user_registration_url
  end
end