RailsCasts Pro episodes are now free!

Learn more or hide this

mindgam3's Profile

GitHub User: mindgam3

Comments by

Avatar

If you are using coffeescript then use:

ruby
  $('#sign_in').click (e) ->
    e.preventDefault()
    FB.login ((response) ->
      window.location = '/auth/facebook/callback' if response.authResponse), scope: "email"