{"action":"created","comment":{"url":"https://api.github.com/repos/coolsnowmail/messager/pulls/comments/78740822","id":78740822,"diff_hunk":"@@ -1,23 +1,36 @@\n class UsersController < ApplicationController\n-  before_action :authenticate_user! \n+  before_action :authenticate_user!, :vk_for_user\n   def index\n-  \t@user = current_user\n-  \tredirect_to user_path(current_user)\n+    redirect_to user_path(current_user.id)\n   end\n \n   def show\n-  \t@user = current_user\n-  \t@message = current_user.messages.build\n+    current_user.update_attributes(timezone: Time.zone.name) if current_user.timezone == nil\n+    sender_ids = current_user.messages.pluck(:sender_id).uniq\n+    @senders = Sender.find(sender_ids)\n+    unless params[:sender_id] == nil\n+      @users_and_senders_messages = @user.messages.for_sender(params[:sender_id])\n+      @sender_message = @user.messages.build(sender_id: params[:sender_id])\n+    end\n+  end\n \n+  def vk_for_user\n+      @user = current_user\n+      @service_user_vk = @user.service_users.where(service_id: 1).first","path":"app/controllers/users_controller.rb","position":24,"original_position":24,"commit_id":"ef445530ea83628e45c195417ecb9b1538d200b4","original_commit_id":"ef445530ea83628e45c195417ecb9b1538d200b4","user":{"login":"reshetov","id":1003798,"avatar_url":"https://avatars.githubusercontent.com/u/1003798?v=3","gravatar_id":"","url":"https://api.github.com/users/reshetov","html_url":"https://github.com/reshetov","followers_url":"https://api.github.com/users/reshetov/followers","following_url":"https://api.github.com/users/reshetov/following{/other_user}","gists_url":"https://api.github.com/users/reshetov/gists{/gist_id}","starred_url":"https://api.github.com/users/reshetov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reshetov/subscriptions","organizations_url":"https://api.github.com/users/reshetov/orgs","repos_url":"https://api.github.com/users/reshetov/repos","events_url":"https://api.github.com/users/reshetov/events{/privacy}","received_events_url":"https://api.github.com/users/reshetov/received_events","type":"User","site_admin":false},"body":"1","created_at":"2016-09-14T12:46:35Z","updated_at":"2016-09-14T12:46:35Z","html_url":"https://github.com/coolsnowmail/messager/pull/3#discussion_r78740822","pull_request_url":"https://api.github.com/repos/coolsnowmail/messager/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/coolsnowmail/messager/pulls/comments/78740822"},"html":{"href":"https://github.com/coolsnowmail/messager/pull/3#discussion_r78740822"},"pull_request":{"href":"https://api.github.com/repos/coolsnowmail/messager/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/coolsnowmail/messager/pulls/3","id":75202961,"html_url":"https://github.com/coolsnowmail/messager/pull/3","diff_url":"https://github.com/coolsnowmail/messager/pull/3.diff","patch_url":"https://github.com/coolsnowmail/messager/pull/3.patch","issue_url":"https://api.github.com/repos/coolsnowmail/messager/issues/3","number":3,"state":"open","locked":false,"title":"Messager liver","user":{"login":"coolsnowmail","id":19538665,"avatar_url":"https://avatars.githubusercontent.com/u/19538665?v=3","gravatar_id":"","url":"https://api.github.com/users/coolsnowmail","html_url":"https://github.com/coolsnowmail","followers_url":"https://api.github.com/users/coolsnowmail/followers","following_url":"https://api.github.com/users/coolsnowmail/following{/other_user}","gists_url":"https://api.github.com/users/coolsnowmail/gists{/gist_id}","starred_url":"https://api.github.com/users/coolsnowmail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coolsnowmail/subscriptions","organizations_url":"https://api.github.com/users/coolsnowmail/orgs","repos_url":"https://api.github.com/users/coolsnowmail/repos","events_url":"https://api.github.com/users/coolsnowmail/events{/privacy}","received_events_url":"https://api.github.com/users/coolsnowmail/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-25T11:45:53Z","updated_at":"2016-09-14T12:46:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eab1a73c068f9cb7a605147efb893ecb283e1ce1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/coolsnowmail/messager/pulls/3/commits","review_comments_url":"https://api.github.com/repos/coolsnowmail/messager/pulls/3/comments","review_comment_url":"https://api.github.com/repos/coolsnowmail/messager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coolsnowmail/messager/issues/3/comments","statuses_url":"https://api.github.com/repos/coolsnowmail/messager/statuses/ef445530ea83628e45c195417ecb9b1538d200b4","head":{"label":"coolsnowmail:messager_liver","ref":"messager_liver","sha":"ef445530ea83628e45c195417ecb9b1538d200b4","user":{"login":"coolsnowmail","id":19538665,"avatar_url":"https://avatars.githubusercontent.com/u/19538665?v=3","gravatar_id":"","url":"https://api.github.com/users/coolsnowmail","html_url":"https://github.com/coolsnowmail","followers_url":"https://api.github.com/users/coolsnowmail/followers","following_url":"https://api.github.com/users/coolsnowmail/following{/other_user}","gists_url":"https://api.github.com/users/coolsnowmail/gists{/gist_id}","starred_url":"https://api.github.com/users/coolsnowmail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coolsnowmail/subscriptions","organizations_url":"https://api.github.com/users/coolsnowmail/orgs","repos_url":"https://api.github.com/users/coolsnowmail/repos","events_url":"https://api.github.com/users/coolsnowmail/events{/privacy}","received_events_url":"https://api.github.com/users/coolsnowmail/received_events","type":"User","site_admin":false},"repo":{"id":59744486,"name":"messager","full_name":"coolsnowmail/messager","owner":{"login":"coolsnowmail","id":19538665,"avatar_url":"https://avatars.githubusercontent.com/u/19538665?v=3","gravatar_id":"","url":"https://api.github.com/users/coolsnowmail","html_url":"https://github.com/coolsnowmail","followers_url":"https://api.github.com/users/coolsnowmail/followers","following_url":"https://api.github.com/users/coolsnowmail/following{/other_user}","gists_url":"https://api.github.com/users/coolsnowmail/gists{/gist_id}","starred_url":"https://api.github.com/users/coolsnowmail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coolsnowmail/subscriptions","organizations_url":"https://api.github.com/users/coolsnowmail/orgs","repos_url":"https://api.github.com/users/coolsnowmail/repos","events_url":"https://api.github.com/users/coolsnowmail/events{/privacy}","received_events_url":"https://api.github.com/users/coolsnowmail/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/coolsnowmail/messager","description":"","fork":false,"url":"https://api.github.com/repos/coolsnowmail/messager","forks_url":"https://api.github.com/repos/coolsnowmail/messager/forks","keys_url":"https://api.github.com/repos/coolsnowmail/messager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coolsnowmail/messager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coolsnowmail/messager/teams","hooks_url":"https://api.github.com/repos/coolsnowmail/messager/hooks","issue_events_url":"https://api.github.com/repos/coolsnowmail/messager/issues/events{/number}","events_url":"https://api.github.com/repos/coolsnowmail/messager/events","assignees_url":"https://api.github.com/repos/coolsnowmail/messager/assignees{/user}","branches_url":"https://api.github.com/repos/coolsnowmail/messager/branches{/branch}","tags_url":"https://api.github.com/repos/coolsnowmail/messager/tags","blobs_url":"https://api.github.com/repos/coolsnowmail/messager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coolsnowmail/messager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coolsnowmail/messager/git/refs{/sha}","trees_url":"https://api.github.com/repos/coolsnowmail/messager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coolsnowmail/messager/statuses/{sha}","languages_url":"https://api.github.com/repos/coolsnowmail/messager/languages","stargazers_url":"https://api.github.com/repos/coolsnowmail/messager/stargazers","contributors_url":"https://api.github.com/repos/coolsnowmail/messager/contributors","subscribers_url":"https://api.github.com/repos/coolsnowmail/messager/subscribers","subscription_url":"https://api.github.com/repos/coolsnowmail/messager/subscription","commits_url":"https://api.github.com/repos/coolsnowmail/messager/commits{/sha}","git_commits_url":"https://api.github.com/repos/coolsnowmail/messager/git/commits{/sha}","comments_url":"https://api.github.com/repos/coolsnowmail/messager/comments{/number}","issue_comment_url":"https://api.github.com/repos/coolsnowmail/messager/issues/comments{/number}","contents_url":"https://api.github.com/repos/coolsnowmail/messager/contents/{+path}","compare_url":"https://api.github.com/repos/coolsnowmail/messager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coolsnowmail/messager/merges","archive_url":"https://api.github.com/repos/coolsnowmail/messager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coolsnowmail/messager/downloads","issues_url":"https://api.github.com/repos/coolsnowmail/messager/issues{/number}","pulls_url":"https://api.github.com/repos/coolsnowmail/messager/pulls{/number}","milestones_url":"https://api.github.com/repos/coolsnowmail/messager/milestones{/number}","notifications_url":"https://api.github.com/repos/coolsnowmail/messager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coolsnowmail/messager/labels{/name}","releases_url":"https://api.github.com/repos/coolsnowmail/messager/releases{/id}","deployments_url":"https://api.github.com/repos/coolsnowmail/messager/deployments","created_at":"2016-05-26T11:19:37Z","updated_at":"2016-05-26T11:20:32Z","pushed_at":"2016-09-12T19:33:12Z","git_url":"git://github.com/coolsnowmail/messager.git","ssh_url":"git@github.com:coolsnowmail/messager.git","clone_url":"https://github.com/coolsnowmail/messager.git","svn_url":"https://github.com/coolsnowmail/messager","homepage":null,"size":57128,"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":"coolsnowmail:master","ref":"master","sha":"b8e6e283786c76d58a80a36cef40b935a661cbbc","user":{"login":"coolsnowmail","id":19538665,"avatar_url":"https://avatars.githubusercontent.com/u/19538665?v=3","gravatar_id":"","url":"https://api.github.com/users/coolsnowmail","html_url":"https://github.com/coolsnowmail","followers_url":"https://api.github.com/users/coolsnowmail/followers","following_url":"https://api.github.com/users/coolsnowmail/following{/other_user}","gists_url":"https://api.github.com/users/coolsnowmail/gists{/gist_id}","starred_url":"https://api.github.com/users/coolsnowmail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coolsnowmail/subscriptions","organizations_url":"https://api.github.com/users/coolsnowmail/orgs","repos_url":"https://api.github.com/users/coolsnowmail/repos","events_url":"https://api.github.com/users/coolsnowmail/events{/privacy}","received_events_url":"https://api.github.com/users/coolsnowmail/received_events","type":"User","site_admin":false},"repo":{"id":59744486,"name":"messager","full_name":"coolsnowmail/messager","owner":{"login":"coolsnowmail","id":19538665,"avatar_url":"https://avatars.githubusercontent.com/u/19538665?v=3","gravatar_id":"","url":"https://api.github.com/users/coolsnowmail","html_url":"https://github.com/coolsnowmail","followers_url":"https://api.github.com/users/coolsnowmail/followers","following_url":"https://api.github.com/users/coolsnowmail/following{/other_user}","gists_url":"https://api.github.com/users/coolsnowmail/gists{/gist_id}","starred_url":"https://api.github.com/users/coolsnowmail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coolsnowmail/subscriptions","organizations_url":"https://api.github.com/users/coolsnowmail/orgs","repos_url":"https://api.github.com/users/coolsnowmail/repos","events_url":"https://api.github.com/users/coolsnowmail/events{/privacy}","received_events_url":"https://api.github.com/users/coolsnowmail/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/coolsnowmail/messager","description":"","fork":false,"url":"https://api.github.com/repos/coolsnowmail/messager","forks_url":"https://api.github.com/repos/coolsnowmail/messager/forks","keys_url":"https://api.github.com/repos/coolsnowmail/messager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coolsnowmail/messager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coolsnowmail/messager/teams","hooks_url":"https://api.github.com/repos/coolsnowmail/messager/hooks","issue_events_url":"https://api.github.com/repos/coolsnowmail/messager/issues/events{/number}","events_url":"https://api.github.com/repos/coolsnowmail/messager/events","assignees_url":"https://api.github.com/repos/coolsnowmail/messager/assignees{/user}","branches_url":"https://api.github.com/repos/coolsnowmail/messager/branches{/branch}","tags_url":"https://api.github.com/repos/coolsnowmail/messager/tags","blobs_url":"https://api.github.com/repos/coolsnowmail/messager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coolsnowmail/messager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coolsnowmail/messager/git/refs{/sha}","trees_url":"https://api.github.com/repos/coolsnowmail/messager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coolsnowmail/messager/statuses/{sha}","languages_url":"https://api.github.com/repos/coolsnowmail/messager/languages","stargazers_url":"https://api.github.com/repos/coolsnowmail/messager/stargazers","contributors_url":"https://api.github.com/repos/coolsnowmail/messager/contributors","subscribers_url":"https://api.github.com/repos/coolsnowmail/messager/subscribers","subscription_url":"https://api.github.com/repos/coolsnowmail/messager/subscription","commits_url":"https://api.github.com/repos/coolsnowmail/messager/commits{/sha}","git_commits_url":"https://api.github.com/repos/coolsnowmail/messager/git/commits{/sha}","comments_url":"https://api.github.com/repos/coolsnowmail/messager/comments{/number}","issue_comment_url":"https://api.github.com/repos/coolsnowmail/messager/issues/comments{/number}","contents_url":"https://api.github.com/repos/coolsnowmail/messager/contents/{+path}","compare_url":"https://api.github.com/repos/coolsnowmail/messager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coolsnowmail/messager/merges","archive_url":"https://api.github.com/repos/coolsnowmail/messager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coolsnowmail/messager/downloads","issues_url":"https://api.github.com/repos/coolsnowmail/messager/issues{/number}","pulls_url":"https://api.github.com/repos/coolsnowmail/messager/pulls{/number}","milestones_url":"https://api.github.com/repos/coolsnowmail/messager/milestones{/number}","notifications_url":"https://api.github.com/repos/coolsnowmail/messager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coolsnowmail/messager/labels{/name}","releases_url":"https://api.github.com/repos/coolsnowmail/messager/releases{/id}","deployments_url":"https://api.github.com/repos/coolsnowmail/messager/deployments","created_at":"2016-05-26T11:19:37Z","updated_at":"2016-05-26T11:20:32Z","pushed_at":"2016-09-12T19:33:12Z","git_url":"git://github.com/coolsnowmail/messager.git","ssh_url":"git@github.com:coolsnowmail/messager.git","clone_url":"https://github.com/coolsnowmail/messager.git","svn_url":"https://github.com/coolsnowmail/messager","homepage":null,"size":57128,"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/coolsnowmail/messager/pulls/3"},"html":{"href":"https://github.com/coolsnowmail/messager/pull/3"},"issue":{"href":"https://api.github.com/repos/coolsnowmail/messager/issues/3"},"comments":{"href":"https://api.github.com/repos/coolsnowmail/messager/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/coolsnowmail/messager/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/coolsnowmail/messager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coolsnowmail/messager/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/coolsnowmail/messager/statuses/ef445530ea83628e45c195417ecb9b1538d200b4"}}}}
{"actor":{"display_login":"reshetov"}}