{"action":"created","comment":{"url":"https://api.github.com/repos/glittergallery/GlitterGallery/pulls/comments/26044745","id":26044745,"diff_hunk":"@@ -3,7 +3,7 @@ class Comment < ActiveRecord::Base\n   belongs_to :user\n   validates :body, :presence => :true\n \n-  default_scope order: 'comments.created_at DESC'\n+  default_scope { order('comments.created_at DESC')}","path":"app/models/comment.rb","position":5,"original_position":5,"commit_id":"ab51dbd105335c0c2cf2f7fce584961ecb13eb62","original_commit_id":"ab51dbd105335c0c2cf2f7fce584961ecb13eb62","user":{"login":"sonalkr132","id":7680662,"avatar_url":"https://avatars.githubusercontent.com/u/7680662?v=3","gravatar_id":"","url":"https://api.github.com/users/sonalkr132","html_url":"https://github.com/sonalkr132","followers_url":"https://api.github.com/users/sonalkr132/followers","following_url":"https://api.github.com/users/sonalkr132/following{/other_user}","gists_url":"https://api.github.com/users/sonalkr132/gists{/gist_id}","starred_url":"https://api.github.com/users/sonalkr132/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonalkr132/subscriptions","organizations_url":"https://api.github.com/users/sonalkr132/orgs","repos_url":"https://api.github.com/users/sonalkr132/repos","events_url":"https://api.github.com/users/sonalkr132/events{/privacy}","received_events_url":"https://api.github.com/users/sonalkr132/received_events","type":"User","site_admin":false},"body":"Support for default_scope without block was removed from rails 4.1. You should look [here](http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#changes-on-default-scopes#changes-on-default-scopes) and [here](http://stackoverflow.com/questions/24163571/default-scope-activerecord-4-1-block-usage-for-ordering#answer-24164710) \r\nAlthough, doc of default_scope still says we can use ones without block. But error in log clearly said that default_scope without blocks is no longer supported. I think that stackoverflow question explains it a bit.  ","created_at":"2015-03-09T15:24:51Z","updated_at":"2015-03-09T15:24:51Z","html_url":"https://github.com/glittergallery/GlitterGallery/pull/231#discussion_r26044745","pull_request_url":"https://api.github.com/repos/glittergallery/GlitterGallery/pulls/231","_links":{"self":{"href":"https://api.github.com/repos/glittergallery/GlitterGallery/pulls/comments/26044745"},"html":{"href":"https://github.com/glittergallery/GlitterGallery/pull/231#discussion_r26044745"},"pull_request":{"href":"https://api.github.com/repos/glittergallery/GlitterGallery/pulls/231"}}},"pull_request":{"url":"https://api.github.com/repos/glittergallery/GlitterGallery/pulls/231","id":30726562,"html_url":"https://github.com/glittergallery/GlitterGallery/pull/231","diff_url":"https://github.com/glittergallery/GlitterGallery/pull/231.diff","patch_url":"https://github.com/glittergallery/GlitterGallery/pull/231.patch","issue_url":"https://api.github.com/repos/glittergallery/GlitterGallery/issues/231","number":231,"state":"open","locked":false,"title":"relation between forks and repos defined","user":{"login":"sonalkr132","id":7680662,"avatar_url":"https://avatars.githubusercontent.com/u/7680662?v=3","gravatar_id":"","url":"https://api.github.com/users/sonalkr132","html_url":"https://github.com/sonalkr132","followers_url":"https://api.github.com/users/sonalkr132/followers","following_url":"https://api.github.com/users/sonalkr132/following{/other_user}","gists_url":"https://api.github.com/users/sonalkr132/gists{/gist_id}","starred_url":"https://api.github.com/users/sonalkr132/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonalkr132/subscriptions","organizations_url":"https://api.github.com/users/sonalkr132/orgs","repos_url":"https://api.github.com/users/sonalkr132/repos","events_url":"https://api.github.com/users/sonalkr132/events{/privacy}","received_events_url":"https://api.github.com/users/sonalkr132/received_events","type":"User","site_admin":false},"body":"As suggested, I have changed parent to parent_id and defined relation between forks and it's parents. `project.forks` and `project.parents` commands work from rails console. They would be handy, when we implement view for seeing all the forks of a certain project.\r\nI had to make a few changes in view as per new project<-fork relationship.\r\n\r\nI tend to follow thumb rule that whenever you add a migrate you try to migrate it all the way down to version 0. I came across many irreversible migrations, I have fixed some of them but eventually I had to give up and comment things out whenever reverting failed.. I would like to discuss how we should handle this irreversible migration situation here #230   ","created_at":"2015-03-08T21:10:53Z","updated_at":"2015-03-09T15:24:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa5255d4674f8eeb81bd4306e60f6bd46d19f104","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/glittergallery/GlitterGallery/pulls/231/commits","review_comments_url":"https://api.github.com/repos/glittergallery/GlitterGallery/pulls/231/comments","review_comment_url":"https://api.github.com/repos/glittergallery/GlitterGallery/pulls/comments{/number}","comments_url":"https://api.github.com/repos/glittergallery/GlitterGallery/issues/231/comments","statuses_url":"https://api.github.com/repos/glittergallery/GlitterGallery/statuses/ab51dbd105335c0c2cf2f7fce584961ecb13eb62","head":{"label":"sonalkr132:fork_relations","ref":"fork_relations","sha":"ab51dbd105335c0c2cf2f7fce584961ecb13eb62","user":{"login":"sonalkr132","id":7680662,"avatar_url":"https://avatars.githubusercontent.com/u/7680662?v=3","gravatar_id":"","url":"https://api.github.com/users/sonalkr132","html_url":"https://github.com/sonalkr132","followers_url":"https://api.github.com/users/sonalkr132/followers","following_url":"https://api.github.com/users/sonalkr132/following{/other_user}","gists_url":"https://api.github.com/users/sonalkr132/gists{/gist_id}","starred_url":"https://api.github.com/users/sonalkr132/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonalkr132/subscriptions","organizations_url":"https://api.github.com/users/sonalkr132/orgs","repos_url":"https://api.github.com/users/sonalkr132/repos","events_url":"https://api.github.com/users/sonalkr132/events{/privacy}","received_events_url":"https://api.github.com/users/sonalkr132/received_events","type":"User","site_admin":false},"repo":{"id":31713134,"name":"GlitterGallery","full_name":"sonalkr132/GlitterGallery","owner":{"login":"sonalkr132","id":7680662,"avatar_url":"https://avatars.githubusercontent.com/u/7680662?v=3","gravatar_id":"","url":"https://api.github.com/users/sonalkr132","html_url":"https://github.com/sonalkr132","followers_url":"https://api.github.com/users/sonalkr132/followers","following_url":"https://api.github.com/users/sonalkr132/following{/other_user}","gists_url":"https://api.github.com/users/sonalkr132/gists{/gist_id}","starred_url":"https://api.github.com/users/sonalkr132/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonalkr132/subscriptions","organizations_url":"https://api.github.com/users/sonalkr132/orgs","repos_url":"https://api.github.com/users/sonalkr132/repos","events_url":"https://api.github.com/users/sonalkr132/events{/privacy}","received_events_url":"https://api.github.com/users/sonalkr132/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sonalkr132/GlitterGallery","description":"Share, collect feedback on, and view/manage design iterations.","fork":true,"url":"https://api.github.com/repos/sonalkr132/GlitterGallery","forks_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/forks","keys_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/teams","hooks_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/hooks","issue_events_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/issues/events{/number}","events_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/events","assignees_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/assignees{/user}","branches_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/branches{/branch}","tags_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/tags","blobs_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/statuses/{sha}","languages_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/languages","stargazers_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/stargazers","contributors_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/contributors","subscribers_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/subscribers","subscription_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/subscription","commits_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/issues/comments{/number}","contents_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/contents/{+path}","compare_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/merges","archive_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/downloads","issues_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/issues{/number}","pulls_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/pulls{/number}","milestones_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/milestones{/number}","notifications_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/labels{/name}","releases_url":"https://api.github.com/repos/sonalkr132/GlitterGallery/releases{/id}","created_at":"2015-03-05T12:41:04Z","updated_at":"2015-03-08T14:42:18Z","pushed_at":"2015-03-09T10:42:20Z","git_url":"git://github.com/sonalkr132/GlitterGallery.git","ssh_url":"git@github.com:sonalkr132/GlitterGallery.git","clone_url":"https://github.com/sonalkr132/GlitterGallery.git","svn_url":"https://github.com/sonalkr132/GlitterGallery","homepage":"","size":25493,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"glittergallery:master","ref":"master","sha":"9a631806837b21ef2c80ee65618f1766dcea1aa2","user":{"login":"glittergallery","id":6554891,"avatar_url":"https://avatars.githubusercontent.com/u/6554891?v=3","gravatar_id":"","url":"https://api.github.com/users/glittergallery","html_url":"https://github.com/glittergallery","followers_url":"https://api.github.com/users/glittergallery/followers","following_url":"https://api.github.com/users/glittergallery/following{/other_user}","gists_url":"https://api.github.com/users/glittergallery/gists{/gist_id}","starred_url":"https://api.github.com/users/glittergallery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glittergallery/subscriptions","organizations_url":"https://api.github.com/users/glittergallery/orgs","repos_url":"https://api.github.com/users/glittergallery/repos","events_url":"https://api.github.com/users/glittergallery/events{/privacy}","received_events_url":"https://api.github.com/users/glittergallery/received_events","type":"Organization","site_admin":false},"repo":{"id":4059120,"name":"GlitterGallery","full_name":"glittergallery/GlitterGallery","owner":{"login":"glittergallery","id":6554891,"avatar_url":"https://avatars.githubusercontent.com/u/6554891?v=3","gravatar_id":"","url":"https://api.github.com/users/glittergallery","html_url":"https://github.com/glittergallery","followers_url":"https://api.github.com/users/glittergallery/followers","following_url":"https://api.github.com/users/glittergallery/following{/other_user}","gists_url":"https://api.github.com/users/glittergallery/gists{/gist_id}","starred_url":"https://api.github.com/users/glittergallery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glittergallery/subscriptions","organizations_url":"https://api.github.com/users/glittergallery/orgs","repos_url":"https://api.github.com/users/glittergallery/repos","events_url":"https://api.github.com/users/glittergallery/events{/privacy}","received_events_url":"https://api.github.com/users/glittergallery/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/glittergallery/GlitterGallery","description":"Share, collect feedback on, and view/manage design iterations.","fork":false,"url":"https://api.github.com/repos/glittergallery/GlitterGallery","forks_url":"https://api.github.com/repos/glittergallery/GlitterGallery/forks","keys_url":"https://api.github.com/repos/glittergallery/GlitterGallery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/glittergallery/GlitterGallery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/glittergallery/GlitterGallery/teams","hooks_url":"https://api.github.com/repos/glittergallery/GlitterGallery/hooks","issue_events_url":"https://api.github.com/repos/glittergallery/GlitterGallery/issues/events{/number}","events_url":"https://api.github.com/repos/glittergallery/GlitterGallery/events","assignees_url":"https://api.github.com/repos/glittergallery/GlitterGallery/assignees{/user}","branches_url":"https://api.github.com/repos/glittergallery/GlitterGallery/branches{/branch}","tags_url":"https://api.github.com/repos/glittergallery/GlitterGallery/tags","blobs_url":"https://api.github.com/repos/glittergallery/GlitterGallery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/glittergallery/GlitterGallery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/glittergallery/GlitterGallery/git/refs{/sha}","trees_url":"https://api.github.com/repos/glittergallery/GlitterGallery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/glittergallery/GlitterGallery/statuses/{sha}","languages_url":"https://api.github.com/repos/glittergallery/GlitterGallery/languages","stargazers_url":"https://api.github.com/repos/glittergallery/GlitterGallery/stargazers","contributors_url":"https://api.github.com/repos/glittergallery/GlitterGallery/contributors","subscribers_url":"https://api.github.com/repos/glittergallery/GlitterGallery/subscribers","subscription_url":"https://api.github.com/repos/glittergallery/GlitterGallery/subscription","commits_url":"https://api.github.com/repos/glittergallery/GlitterGallery/commits{/sha}","git_commits_url":"https://api.github.com/repos/glittergallery/GlitterGallery/git/commits{/sha}","comments_url":"https://api.github.com/repos/glittergallery/GlitterGallery/comments{/number}","issue_comment_url":"https://api.github.com/repos/glittergallery/GlitterGallery/issues/comments{/number}","contents_url":"https://api.github.com/repos/glittergallery/GlitterGallery/contents/{+path}","compare_url":"https://api.github.com/repos/glittergallery/GlitterGallery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/glittergallery/GlitterGallery/merges","archive_url":"https://api.github.com/repos/glittergallery/GlitterGallery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/glittergallery/GlitterGallery/downloads","issues_url":"https://api.github.com/repos/glittergallery/GlitterGallery/issues{/number}","pulls_url":"https://api.github.com/repos/glittergallery/GlitterGallery/pulls{/number}","milestones_url":"https://api.github.com/repos/glittergallery/GlitterGallery/milestones{/number}","notifications_url":"https://api.github.com/repos/glittergallery/GlitterGallery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/glittergallery/GlitterGallery/labels{/name}","releases_url":"https://api.github.com/repos/glittergallery/GlitterGallery/releases{/id}","created_at":"2012-04-18T01:39:38Z","updated_at":"2015-03-08T17:27:10Z","pushed_at":"2015-03-08T17:27:10Z","git_url":"git://github.com/glittergallery/GlitterGallery.git","ssh_url":"git@github.com:glittergallery/GlitterGallery.git","clone_url":"https://github.com/glittergallery/GlitterGallery.git","svn_url":"https://github.com/glittergallery/GlitterGallery","homepage":"","size":28210,"stargazers_count":40,"watchers_count":40,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":34,"forks":42,"open_issues":34,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/glittergallery/GlitterGallery/pulls/231"},"html":{"href":"https://github.com/glittergallery/GlitterGallery/pull/231"},"issue":{"href":"https://api.github.com/repos/glittergallery/GlitterGallery/issues/231"},"comments":{"href":"https://api.github.com/repos/glittergallery/GlitterGallery/issues/231/comments"},"review_comments":{"href":"https://api.github.com/repos/glittergallery/GlitterGallery/pulls/231/comments"},"review_comment":{"href":"https://api.github.com/repos/glittergallery/GlitterGallery/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/glittergallery/GlitterGallery/pulls/231/commits"},"statuses":{"href":"https://api.github.com/repos/glittergallery/GlitterGallery/statuses/ab51dbd105335c0c2cf2f7fce584961ecb13eb62"}}}}