{"action":"created","comment":{"url":"https://api.github.com/repos/mazovladimir/ror/pulls/comments/71831739","id":71831739,"diff_hunk":"@@ -49,4 +49,18 @@ def downplackart\n   return downplackart\n   end\n \n+  def ordered_vagons\n+    if sorting?\n+      vagons.order(number: :asc).each do |car|\n+        link_to \"Вагон №#{car.number}\", car \n+      end\n+    else\n+      vagons.order(number: :desc).each do |car|\n+        link_to \"Вагон №#{car.number}\", car","path":"app/models/train.rb","position":11,"original_position":11,"commit_id":"a4be9a939ff52923c6e8abef2f8f3319f8cc5660","original_commit_id":"a4be9a939ff52923c6e8abef2f8f3319f8cc5660","user":{"login":"vkurennov","id":968537,"avatar_url":"https://avatars.githubusercontent.com/u/968537?v=3","gravatar_id":"","url":"https://api.github.com/users/vkurennov","html_url":"https://github.com/vkurennov","followers_url":"https://api.github.com/users/vkurennov/followers","following_url":"https://api.github.com/users/vkurennov/following{/other_user}","gists_url":"https://api.github.com/users/vkurennov/gists{/gist_id}","starred_url":"https://api.github.com/users/vkurennov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkurennov/subscriptions","organizations_url":"https://api.github.com/users/vkurennov/orgs","repos_url":"https://api.github.com/users/vkurennov/repos","events_url":"https://api.github.com/users/vkurennov/events{/privacy}","received_events_url":"https://api.github.com/users/vkurennov/received_events","type":"User","site_admin":false},"body":"link_to не работает в моделях, только в видах","created_at":"2016-07-22T06:24:47Z","updated_at":"2016-07-22T06:24:47Z","html_url":"https://github.com/mazovladimir/ror/pull/2#discussion_r71831739","pull_request_url":"https://api.github.com/repos/mazovladimir/ror/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/mazovladimir/ror/pulls/comments/71831739"},"html":{"href":"https://github.com/mazovladimir/ror/pull/2#discussion_r71831739"},"pull_request":{"href":"https://api.github.com/repos/mazovladimir/ror/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/mazovladimir/ror/pulls/2","id":74470960,"html_url":"https://github.com/mazovladimir/ror/pull/2","diff_url":"https://github.com/mazovladimir/ror/pull/2.diff","patch_url":"https://github.com/mazovladimir/ror/pull/2.patch","issue_url":"https://api.github.com/repos/mazovladimir/ror/issues/2","number":2,"state":"open","locked":false,"title":"Add Vagons","user":{"login":"mazovladimir","id":18594748,"avatar_url":"https://avatars.githubusercontent.com/u/18594748?v=3","gravatar_id":"","url":"https://api.github.com/users/mazovladimir","html_url":"https://github.com/mazovladimir","followers_url":"https://api.github.com/users/mazovladimir/followers","following_url":"https://api.github.com/users/mazovladimir/following{/other_user}","gists_url":"https://api.github.com/users/mazovladimir/gists{/gist_id}","starred_url":"https://api.github.com/users/mazovladimir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mazovladimir/subscriptions","organizations_url":"https://api.github.com/users/mazovladimir/orgs","repos_url":"https://api.github.com/users/mazovladimir/repos","events_url":"https://api.github.com/users/mazovladimir/events{/privacy}","received_events_url":"https://api.github.com/users/mazovladimir/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-20T16:18:32Z","updated_at":"2016-07-22T06:24:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"15b23c9b76f767c3473a48b8f60a4794b646109e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mazovladimir/ror/pulls/2/commits","review_comments_url":"https://api.github.com/repos/mazovladimir/ror/pulls/2/comments","review_comment_url":"https://api.github.com/repos/mazovladimir/ror/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mazovladimir/ror/issues/2/comments","statuses_url":"https://api.github.com/repos/mazovladimir/ror/statuses/a4be9a939ff52923c6e8abef2f8f3319f8cc5660","head":{"label":"mazovladimir:Lesson_15","ref":"Lesson_15","sha":"a4be9a939ff52923c6e8abef2f8f3319f8cc5660","user":{"login":"mazovladimir","id":18594748,"avatar_url":"https://avatars.githubusercontent.com/u/18594748?v=3","gravatar_id":"","url":"https://api.github.com/users/mazovladimir","html_url":"https://github.com/mazovladimir","followers_url":"https://api.github.com/users/mazovladimir/followers","following_url":"https://api.github.com/users/mazovladimir/following{/other_user}","gists_url":"https://api.github.com/users/mazovladimir/gists{/gist_id}","starred_url":"https://api.github.com/users/mazovladimir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mazovladimir/subscriptions","organizations_url":"https://api.github.com/users/mazovladimir/orgs","repos_url":"https://api.github.com/users/mazovladimir/repos","events_url":"https://api.github.com/users/mazovladimir/events{/privacy}","received_events_url":"https://api.github.com/users/mazovladimir/received_events","type":"User","site_admin":false},"repo":{"id":56770207,"name":"ror","full_name":"mazovladimir/ror","owner":{"login":"mazovladimir","id":18594748,"avatar_url":"https://avatars.githubusercontent.com/u/18594748?v=3","gravatar_id":"","url":"https://api.github.com/users/mazovladimir","html_url":"https://github.com/mazovladimir","followers_url":"https://api.github.com/users/mazovladimir/followers","following_url":"https://api.github.com/users/mazovladimir/following{/other_user}","gists_url":"https://api.github.com/users/mazovladimir/gists{/gist_id}","starred_url":"https://api.github.com/users/mazovladimir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mazovladimir/subscriptions","organizations_url":"https://api.github.com/users/mazovladimir/orgs","repos_url":"https://api.github.com/users/mazovladimir/repos","events_url":"https://api.github.com/users/mazovladimir/events{/privacy}","received_events_url":"https://api.github.com/users/mazovladimir/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mazovladimir/ror","description":"","fork":false,"url":"https://api.github.com/repos/mazovladimir/ror","forks_url":"https://api.github.com/repos/mazovladimir/ror/forks","keys_url":"https://api.github.com/repos/mazovladimir/ror/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mazovladimir/ror/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mazovladimir/ror/teams","hooks_url":"https://api.github.com/repos/mazovladimir/ror/hooks","issue_events_url":"https://api.github.com/repos/mazovladimir/ror/issues/events{/number}","events_url":"https://api.github.com/repos/mazovladimir/ror/events","assignees_url":"https://api.github.com/repos/mazovladimir/ror/assignees{/user}","branches_url":"https://api.github.com/repos/mazovladimir/ror/branches{/branch}","tags_url":"https://api.github.com/repos/mazovladimir/ror/tags","blobs_url":"https://api.github.com/repos/mazovladimir/ror/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mazovladimir/ror/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mazovladimir/ror/git/refs{/sha}","trees_url":"https://api.github.com/repos/mazovladimir/ror/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mazovladimir/ror/statuses/{sha}","languages_url":"https://api.github.com/repos/mazovladimir/ror/languages","stargazers_url":"https://api.github.com/repos/mazovladimir/ror/stargazers","contributors_url":"https://api.github.com/repos/mazovladimir/ror/contributors","subscribers_url":"https://api.github.com/repos/mazovladimir/ror/subscribers","subscription_url":"https://api.github.com/repos/mazovladimir/ror/subscription","commits_url":"https://api.github.com/repos/mazovladimir/ror/commits{/sha}","git_commits_url":"https://api.github.com/repos/mazovladimir/ror/git/commits{/sha}","comments_url":"https://api.github.com/repos/mazovladimir/ror/comments{/number}","issue_comment_url":"https://api.github.com/repos/mazovladimir/ror/issues/comments{/number}","contents_url":"https://api.github.com/repos/mazovladimir/ror/contents/{+path}","compare_url":"https://api.github.com/repos/mazovladimir/ror/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mazovladimir/ror/merges","archive_url":"https://api.github.com/repos/mazovladimir/ror/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mazovladimir/ror/downloads","issues_url":"https://api.github.com/repos/mazovladimir/ror/issues{/number}","pulls_url":"https://api.github.com/repos/mazovladimir/ror/pulls{/number}","milestones_url":"https://api.github.com/repos/mazovladimir/ror/milestones{/number}","notifications_url":"https://api.github.com/repos/mazovladimir/ror/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mazovladimir/ror/labels{/name}","releases_url":"https://api.github.com/repos/mazovladimir/ror/releases{/id}","deployments_url":"https://api.github.com/repos/mazovladimir/ror/deployments","created_at":"2016-04-21T12:04:07Z","updated_at":"2016-05-26T16:00:30Z","pushed_at":"2016-07-20T19:14:30Z","git_url":"git://github.com/mazovladimir/ror.git","ssh_url":"git@github.com:mazovladimir/ror.git","clone_url":"https://github.com/mazovladimir/ror.git","svn_url":"https://github.com/mazovladimir/ror","homepage":null,"size":71,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"mazovladimir:master","ref":"master","sha":"67b26ad2ebfeab5663f5fee00d59ed83998d474d","user":{"login":"mazovladimir","id":18594748,"avatar_url":"https://avatars.githubusercontent.com/u/18594748?v=3","gravatar_id":"","url":"https://api.github.com/users/mazovladimir","html_url":"https://github.com/mazovladimir","followers_url":"https://api.github.com/users/mazovladimir/followers","following_url":"https://api.github.com/users/mazovladimir/following{/other_user}","gists_url":"https://api.github.com/users/mazovladimir/gists{/gist_id}","starred_url":"https://api.github.com/users/mazovladimir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mazovladimir/subscriptions","organizations_url":"https://api.github.com/users/mazovladimir/orgs","repos_url":"https://api.github.com/users/mazovladimir/repos","events_url":"https://api.github.com/users/mazovladimir/events{/privacy}","received_events_url":"https://api.github.com/users/mazovladimir/received_events","type":"User","site_admin":false},"repo":{"id":56770207,"name":"ror","full_name":"mazovladimir/ror","owner":{"login":"mazovladimir","id":18594748,"avatar_url":"https://avatars.githubusercontent.com/u/18594748?v=3","gravatar_id":"","url":"https://api.github.com/users/mazovladimir","html_url":"https://github.com/mazovladimir","followers_url":"https://api.github.com/users/mazovladimir/followers","following_url":"https://api.github.com/users/mazovladimir/following{/other_user}","gists_url":"https://api.github.com/users/mazovladimir/gists{/gist_id}","starred_url":"https://api.github.com/users/mazovladimir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mazovladimir/subscriptions","organizations_url":"https://api.github.com/users/mazovladimir/orgs","repos_url":"https://api.github.com/users/mazovladimir/repos","events_url":"https://api.github.com/users/mazovladimir/events{/privacy}","received_events_url":"https://api.github.com/users/mazovladimir/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mazovladimir/ror","description":"","fork":false,"url":"https://api.github.com/repos/mazovladimir/ror","forks_url":"https://api.github.com/repos/mazovladimir/ror/forks","keys_url":"https://api.github.com/repos/mazovladimir/ror/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mazovladimir/ror/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mazovladimir/ror/teams","hooks_url":"https://api.github.com/repos/mazovladimir/ror/hooks","issue_events_url":"https://api.github.com/repos/mazovladimir/ror/issues/events{/number}","events_url":"https://api.github.com/repos/mazovladimir/ror/events","assignees_url":"https://api.github.com/repos/mazovladimir/ror/assignees{/user}","branches_url":"https://api.github.com/repos/mazovladimir/ror/branches{/branch}","tags_url":"https://api.github.com/repos/mazovladimir/ror/tags","blobs_url":"https://api.github.com/repos/mazovladimir/ror/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mazovladimir/ror/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mazovladimir/ror/git/refs{/sha}","trees_url":"https://api.github.com/repos/mazovladimir/ror/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mazovladimir/ror/statuses/{sha}","languages_url":"https://api.github.com/repos/mazovladimir/ror/languages","stargazers_url":"https://api.github.com/repos/mazovladimir/ror/stargazers","contributors_url":"https://api.github.com/repos/mazovladimir/ror/contributors","subscribers_url":"https://api.github.com/repos/mazovladimir/ror/subscribers","subscription_url":"https://api.github.com/repos/mazovladimir/ror/subscription","commits_url":"https://api.github.com/repos/mazovladimir/ror/commits{/sha}","git_commits_url":"https://api.github.com/repos/mazovladimir/ror/git/commits{/sha}","comments_url":"https://api.github.com/repos/mazovladimir/ror/comments{/number}","issue_comment_url":"https://api.github.com/repos/mazovladimir/ror/issues/comments{/number}","contents_url":"https://api.github.com/repos/mazovladimir/ror/contents/{+path}","compare_url":"https://api.github.com/repos/mazovladimir/ror/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mazovladimir/ror/merges","archive_url":"https://api.github.com/repos/mazovladimir/ror/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mazovladimir/ror/downloads","issues_url":"https://api.github.com/repos/mazovladimir/ror/issues{/number}","pulls_url":"https://api.github.com/repos/mazovladimir/ror/pulls{/number}","milestones_url":"https://api.github.com/repos/mazovladimir/ror/milestones{/number}","notifications_url":"https://api.github.com/repos/mazovladimir/ror/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mazovladimir/ror/labels{/name}","releases_url":"https://api.github.com/repos/mazovladimir/ror/releases{/id}","deployments_url":"https://api.github.com/repos/mazovladimir/ror/deployments","created_at":"2016-04-21T12:04:07Z","updated_at":"2016-05-26T16:00:30Z","pushed_at":"2016-07-20T19:14:30Z","git_url":"git://github.com/mazovladimir/ror.git","ssh_url":"git@github.com:mazovladimir/ror.git","clone_url":"https://github.com/mazovladimir/ror.git","svn_url":"https://github.com/mazovladimir/ror","homepage":null,"size":71,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"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/mazovladimir/ror/pulls/2"},"html":{"href":"https://github.com/mazovladimir/ror/pull/2"},"issue":{"href":"https://api.github.com/repos/mazovladimir/ror/issues/2"},"comments":{"href":"https://api.github.com/repos/mazovladimir/ror/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/mazovladimir/ror/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/mazovladimir/ror/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mazovladimir/ror/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/mazovladimir/ror/statuses/a4be9a939ff52923c6e8abef2f8f3319f8cc5660"}}}}
{"actor":{"display_login":"vkurennov"}}