{"action":"created","comment":{"url":"https://api.github.com/repos/quipper/quipper.github.io/pulls/comments/41745392","id":41745392,"diff_hunk":"@@ -0,0 +1,58 @@\n+---\n+layout: post\n+title:  \"Where is my Ruby method defined?\"\n+date:   2015-10-12 11:00:00\n+author: seth\n+comments: true\n+image: /assets/article_images/2015-10-12-where-is-my-ruby-method-defined/junk.jpg\n+---\n+\n+Recently I noticed that the `present?` method was exhibiting weird behaviour on one of our models.\n+\n+{% highlight ruby %}\n+Chapter.new.present?\n+ => false # wut!?\n+{% endhighlight %}\n+\n+\n+## source_location\n+\n+After the initial panic wears off, the sane thing to do in this situation is to find out what `present?` is actually doing.\n+Fortunately, Ruby 1.9+ allows us to find exactly where a method is defined: `source_location` !\n+\n+{% highlight ruby %}\n+Chapter.new.methods(:present?).source_location","path":"_posts/2015-10-12-where-is-my-ruby-method-defined.markdown","position":24,"original_position":24,"commit_id":"fa0a1605d9bdda974cf800d90554e67c6c022d7b","original_commit_id":"349d1daa2c1f303f1a6253a1526bddfa1e45126a","user":{"login":"sethjeffery","id":1628558,"avatar_url":"https://avatars.githubusercontent.com/u/1628558?v=3","gravatar_id":"","url":"https://api.github.com/users/sethjeffery","html_url":"https://github.com/sethjeffery","followers_url":"https://api.github.com/users/sethjeffery/followers","following_url":"https://api.github.com/users/sethjeffery/following{/other_user}","gists_url":"https://api.github.com/users/sethjeffery/gists{/gist_id}","starred_url":"https://api.github.com/users/sethjeffery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethjeffery/subscriptions","organizations_url":"https://api.github.com/users/sethjeffery/orgs","repos_url":"https://api.github.com/users/sethjeffery/repos","events_url":"https://api.github.com/users/sethjeffery/events{/privacy}","received_events_url":"https://api.github.com/users/sethjeffery/received_events","type":"User","site_admin":false},"body":"Thanks","created_at":"2015-10-12T11:03:12Z","updated_at":"2015-10-12T11:03:12Z","html_url":"https://github.com/quipper/quipper.github.io/pull/7#discussion_r41745392","pull_request_url":"https://api.github.com/repos/quipper/quipper.github.io/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/quipper/quipper.github.io/pulls/comments/41745392"},"html":{"href":"https://github.com/quipper/quipper.github.io/pull/7#discussion_r41745392"},"pull_request":{"href":"https://api.github.com/repos/quipper/quipper.github.io/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/quipper/quipper.github.io/pulls/7","id":47406421,"html_url":"https://github.com/quipper/quipper.github.io/pull/7","diff_url":"https://github.com/quipper/quipper.github.io/pull/7.diff","patch_url":"https://github.com/quipper/quipper.github.io/pull/7.patch","issue_url":"https://api.github.com/repos/quipper/quipper.github.io/issues/7","number":7,"state":"open","locked":false,"title":"\"Where is my Ruby Method?\" article","user":{"login":"sethjeffery","id":1628558,"avatar_url":"https://avatars.githubusercontent.com/u/1628558?v=3","gravatar_id":"","url":"https://api.github.com/users/sethjeffery","html_url":"https://github.com/sethjeffery","followers_url":"https://api.github.com/users/sethjeffery/followers","following_url":"https://api.github.com/users/sethjeffery/following{/other_user}","gists_url":"https://api.github.com/users/sethjeffery/gists{/gist_id}","starred_url":"https://api.github.com/users/sethjeffery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethjeffery/subscriptions","organizations_url":"https://api.github.com/users/sethjeffery/orgs","repos_url":"https://api.github.com/users/sethjeffery/repos","events_url":"https://api.github.com/users/sethjeffery/events{/privacy}","received_events_url":"https://api.github.com/users/sethjeffery/received_events","type":"User","site_admin":false},"body":"@quipper/web-devs \r\n\r\nAdded new simple article.\r\nAlso fixed the crazy color cycle on chrome.\r\n","created_at":"2015-10-12T10:51:16Z","updated_at":"2015-10-12T11:03:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"00225dc450f563e823683d2d222c75ad0386c710","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/quipper/quipper.github.io/pulls/7/commits","review_comments_url":"https://api.github.com/repos/quipper/quipper.github.io/pulls/7/comments","review_comment_url":"https://api.github.com/repos/quipper/quipper.github.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/quipper/quipper.github.io/issues/7/comments","statuses_url":"https://api.github.com/repos/quipper/quipper.github.io/statuses/fa0a1605d9bdda974cf800d90554e67c6c022d7b","head":{"label":"quipper:who_moved_my_methods","ref":"who_moved_my_methods","sha":"fa0a1605d9bdda974cf800d90554e67c6c022d7b","user":{"login":"quipper","id":535481,"avatar_url":"https://avatars.githubusercontent.com/u/535481?v=3","gravatar_id":"","url":"https://api.github.com/users/quipper","html_url":"https://github.com/quipper","followers_url":"https://api.github.com/users/quipper/followers","following_url":"https://api.github.com/users/quipper/following{/other_user}","gists_url":"https://api.github.com/users/quipper/gists{/gist_id}","starred_url":"https://api.github.com/users/quipper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quipper/subscriptions","organizations_url":"https://api.github.com/users/quipper/orgs","repos_url":"https://api.github.com/users/quipper/repos","events_url":"https://api.github.com/users/quipper/events{/privacy}","received_events_url":"https://api.github.com/users/quipper/received_events","type":"Organization","site_admin":false},"repo":{"id":35661801,"name":"quipper.github.io","full_name":"quipper/quipper.github.io","owner":{"login":"quipper","id":535481,"avatar_url":"https://avatars.githubusercontent.com/u/535481?v=3","gravatar_id":"","url":"https://api.github.com/users/quipper","html_url":"https://github.com/quipper","followers_url":"https://api.github.com/users/quipper/followers","following_url":"https://api.github.com/users/quipper/following{/other_user}","gists_url":"https://api.github.com/users/quipper/gists{/gist_id}","starred_url":"https://api.github.com/users/quipper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quipper/subscriptions","organizations_url":"https://api.github.com/users/quipper/orgs","repos_url":"https://api.github.com/users/quipper/repos","events_url":"https://api.github.com/users/quipper/events{/privacy}","received_events_url":"https://api.github.com/users/quipper/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/quipper/quipper.github.io","description":"Quipper Tech Team Blog","fork":false,"url":"https://api.github.com/repos/quipper/quipper.github.io","forks_url":"https://api.github.com/repos/quipper/quipper.github.io/forks","keys_url":"https://api.github.com/repos/quipper/quipper.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quipper/quipper.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quipper/quipper.github.io/teams","hooks_url":"https://api.github.com/repos/quipper/quipper.github.io/hooks","issue_events_url":"https://api.github.com/repos/quipper/quipper.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/quipper/quipper.github.io/events","assignees_url":"https://api.github.com/repos/quipper/quipper.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/quipper/quipper.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/quipper/quipper.github.io/tags","blobs_url":"https://api.github.com/repos/quipper/quipper.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quipper/quipper.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quipper/quipper.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/quipper/quipper.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quipper/quipper.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/quipper/quipper.github.io/languages","stargazers_url":"https://api.github.com/repos/quipper/quipper.github.io/stargazers","contributors_url":"https://api.github.com/repos/quipper/quipper.github.io/contributors","subscribers_url":"https://api.github.com/repos/quipper/quipper.github.io/subscribers","subscription_url":"https://api.github.com/repos/quipper/quipper.github.io/subscription","commits_url":"https://api.github.com/repos/quipper/quipper.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/quipper/quipper.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/quipper/quipper.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/quipper/quipper.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/quipper/quipper.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/quipper/quipper.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quipper/quipper.github.io/merges","archive_url":"https://api.github.com/repos/quipper/quipper.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quipper/quipper.github.io/downloads","issues_url":"https://api.github.com/repos/quipper/quipper.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/quipper/quipper.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/quipper/quipper.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/quipper/quipper.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quipper/quipper.github.io/labels{/name}","releases_url":"https://api.github.com/repos/quipper/quipper.github.io/releases{/id}","created_at":"2015-05-15T08:06:07Z","updated_at":"2015-06-03T11:14:04Z","pushed_at":"2015-10-12T10:53:58Z","git_url":"git://github.com/quipper/quipper.github.io.git","ssh_url":"git@github.com:quipper/quipper.github.io.git","clone_url":"https://github.com/quipper/quipper.github.io.git","svn_url":"https://github.com/quipper/quipper.github.io","homepage":"http://quipper.github.io","size":7928,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"quipper:master","ref":"master","sha":"ea4a877e4ae02b8b4fd60891fde7f899c6fdcfd7","user":{"login":"quipper","id":535481,"avatar_url":"https://avatars.githubusercontent.com/u/535481?v=3","gravatar_id":"","url":"https://api.github.com/users/quipper","html_url":"https://github.com/quipper","followers_url":"https://api.github.com/users/quipper/followers","following_url":"https://api.github.com/users/quipper/following{/other_user}","gists_url":"https://api.github.com/users/quipper/gists{/gist_id}","starred_url":"https://api.github.com/users/quipper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quipper/subscriptions","organizations_url":"https://api.github.com/users/quipper/orgs","repos_url":"https://api.github.com/users/quipper/repos","events_url":"https://api.github.com/users/quipper/events{/privacy}","received_events_url":"https://api.github.com/users/quipper/received_events","type":"Organization","site_admin":false},"repo":{"id":35661801,"name":"quipper.github.io","full_name":"quipper/quipper.github.io","owner":{"login":"quipper","id":535481,"avatar_url":"https://avatars.githubusercontent.com/u/535481?v=3","gravatar_id":"","url":"https://api.github.com/users/quipper","html_url":"https://github.com/quipper","followers_url":"https://api.github.com/users/quipper/followers","following_url":"https://api.github.com/users/quipper/following{/other_user}","gists_url":"https://api.github.com/users/quipper/gists{/gist_id}","starred_url":"https://api.github.com/users/quipper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quipper/subscriptions","organizations_url":"https://api.github.com/users/quipper/orgs","repos_url":"https://api.github.com/users/quipper/repos","events_url":"https://api.github.com/users/quipper/events{/privacy}","received_events_url":"https://api.github.com/users/quipper/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/quipper/quipper.github.io","description":"Quipper Tech Team Blog","fork":false,"url":"https://api.github.com/repos/quipper/quipper.github.io","forks_url":"https://api.github.com/repos/quipper/quipper.github.io/forks","keys_url":"https://api.github.com/repos/quipper/quipper.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quipper/quipper.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quipper/quipper.github.io/teams","hooks_url":"https://api.github.com/repos/quipper/quipper.github.io/hooks","issue_events_url":"https://api.github.com/repos/quipper/quipper.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/quipper/quipper.github.io/events","assignees_url":"https://api.github.com/repos/quipper/quipper.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/quipper/quipper.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/quipper/quipper.github.io/tags","blobs_url":"https://api.github.com/repos/quipper/quipper.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quipper/quipper.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quipper/quipper.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/quipper/quipper.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quipper/quipper.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/quipper/quipper.github.io/languages","stargazers_url":"https://api.github.com/repos/quipper/quipper.github.io/stargazers","contributors_url":"https://api.github.com/repos/quipper/quipper.github.io/contributors","subscribers_url":"https://api.github.com/repos/quipper/quipper.github.io/subscribers","subscription_url":"https://api.github.com/repos/quipper/quipper.github.io/subscription","commits_url":"https://api.github.com/repos/quipper/quipper.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/quipper/quipper.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/quipper/quipper.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/quipper/quipper.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/quipper/quipper.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/quipper/quipper.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quipper/quipper.github.io/merges","archive_url":"https://api.github.com/repos/quipper/quipper.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quipper/quipper.github.io/downloads","issues_url":"https://api.github.com/repos/quipper/quipper.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/quipper/quipper.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/quipper/quipper.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/quipper/quipper.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quipper/quipper.github.io/labels{/name}","releases_url":"https://api.github.com/repos/quipper/quipper.github.io/releases{/id}","created_at":"2015-05-15T08:06:07Z","updated_at":"2015-06-03T11:14:04Z","pushed_at":"2015-10-12T10:53:58Z","git_url":"git://github.com/quipper/quipper.github.io.git","ssh_url":"git@github.com:quipper/quipper.github.io.git","clone_url":"https://github.com/quipper/quipper.github.io.git","svn_url":"https://github.com/quipper/quipper.github.io","homepage":"http://quipper.github.io","size":7928,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/quipper/quipper.github.io/pulls/7"},"html":{"href":"https://github.com/quipper/quipper.github.io/pull/7"},"issue":{"href":"https://api.github.com/repos/quipper/quipper.github.io/issues/7"},"comments":{"href":"https://api.github.com/repos/quipper/quipper.github.io/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/quipper/quipper.github.io/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/quipper/quipper.github.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/quipper/quipper.github.io/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/quipper/quipper.github.io/statuses/fa0a1605d9bdda974cf800d90554e67c6c022d7b"}}}}