Skip to content

Instantly share code, notes, and snippets.

@meltzerj
Created May 27, 2011 05:31
Show Gist options
  • Select an option

  • Save meltzerj/994692 to your computer and use it in GitHub Desktop.

Select an option

Save meltzerj/994692 to your computer and use it in GitHub Desktop.
Error:
NoMethodError (You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.[]):
Code:
@fb_friends = @graph.get_connections("me", "friends")
@returned_friends = @fb_friends.select { |k,v| v["name"] == "#{params[:term]}" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment