{"action":"created","comment":{"url":"https://api.github.com/repos/AgrailT800/flashcards/pulls/comments/35506775","id":35506775,"diff_hunk":"@@ -10,9 +10,25 @@ def update\n     end\n   end\n \n+  def set_local_en\n+    set_local :en\n+  end\n+\n+  def set_local_ru\n+    set_local :ru\n+  end\n+\n   private\n \n   def profile_params\n     params.require(:user).permit(:email, :password, :password_confirmation)\n   end\n+\n+  def set_local(locale)","path":"app/controllers/profiles_controller.rb","position":18,"original_position":18,"commit_id":"0206e14dfef383c450e8c1173743aba9c004a47e","original_commit_id":"0206e14dfef383c450e8c1173743aba9c004a47e","user":{"login":"mkdev-mentor-1","id":11962702,"avatar_url":"https://avatars.githubusercontent.com/u/11962702?v=3","gravatar_id":"","url":"https://api.github.com/users/mkdev-mentor-1","html_url":"https://github.com/mkdev-mentor-1","followers_url":"https://api.github.com/users/mkdev-mentor-1/followers","following_url":"https://api.github.com/users/mkdev-mentor-1/following{/other_user}","gists_url":"https://api.github.com/users/mkdev-mentor-1/gists{/gist_id}","starred_url":"https://api.github.com/users/mkdev-mentor-1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkdev-mentor-1/subscriptions","organizations_url":"https://api.github.com/users/mkdev-mentor-1/orgs","repos_url":"https://api.github.com/users/mkdev-mentor-1/repos","events_url":"https://api.github.com/users/mkdev-mentor-1/events{/privacy}","received_events_url":"https://api.github.com/users/mkdev-mentor-1/received_events","type":"User","site_admin":false},"body":"set_locale. А вообще - не надо под каждую локаль по методу, хватит одного метода set_locale, и параметр params[:locale]. А ещё лучше - просто добавь ещё одно поле в форму редактирования профиля, для локали","created_at":"2015-07-27T05:37:33Z","updated_at":"2015-07-27T05:37:33Z","html_url":"https://github.com/AgrailT800/flashcards/pull/16#discussion_r35506775","pull_request_url":"https://api.github.com/repos/AgrailT800/flashcards/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/AgrailT800/flashcards/pulls/comments/35506775"},"html":{"href":"https://github.com/AgrailT800/flashcards/pull/16#discussion_r35506775"},"pull_request":{"href":"https://api.github.com/repos/AgrailT800/flashcards/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/AgrailT800/flashcards/pulls/16","id":40855265,"html_url":"https://github.com/AgrailT800/flashcards/pull/16","diff_url":"https://github.com/AgrailT800/flashcards/pull/16.diff","patch_url":"https://github.com/AgrailT800/flashcards/pull/16.patch","issue_url":"https://api.github.com/repos/AgrailT800/flashcards/issues/16","number":16,"state":"open","locked":false,"title":"Sixteenth task","user":{"login":"AgrailT800","id":7202029,"avatar_url":"https://avatars.githubusercontent.com/u/7202029?v=3","gravatar_id":"","url":"https://api.github.com/users/AgrailT800","html_url":"https://github.com/AgrailT800","followers_url":"https://api.github.com/users/AgrailT800/followers","following_url":"https://api.github.com/users/AgrailT800/following{/other_user}","gists_url":"https://api.github.com/users/AgrailT800/gists{/gist_id}","starred_url":"https://api.github.com/users/AgrailT800/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgrailT800/subscriptions","organizations_url":"https://api.github.com/users/AgrailT800/orgs","repos_url":"https://api.github.com/users/AgrailT800/repos","events_url":"https://api.github.com/users/AgrailT800/events{/privacy}","received_events_url":"https://api.github.com/users/AgrailT800/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-26T15:56:57Z","updated_at":"2015-07-27T05:37:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0920e5cc8a4984ef943c1f45b016028e04d0d641","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AgrailT800/flashcards/pulls/16/commits","review_comments_url":"https://api.github.com/repos/AgrailT800/flashcards/pulls/16/comments","review_comment_url":"https://api.github.com/repos/AgrailT800/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AgrailT800/flashcards/issues/16/comments","statuses_url":"https://api.github.com/repos/AgrailT800/flashcards/statuses/0206e14dfef383c450e8c1173743aba9c004a47e","head":{"label":"AgrailT800:sixteenth-task","ref":"sixteenth-task","sha":"0206e14dfef383c450e8c1173743aba9c004a47e","user":{"login":"AgrailT800","id":7202029,"avatar_url":"https://avatars.githubusercontent.com/u/7202029?v=3","gravatar_id":"","url":"https://api.github.com/users/AgrailT800","html_url":"https://github.com/AgrailT800","followers_url":"https://api.github.com/users/AgrailT800/followers","following_url":"https://api.github.com/users/AgrailT800/following{/other_user}","gists_url":"https://api.github.com/users/AgrailT800/gists{/gist_id}","starred_url":"https://api.github.com/users/AgrailT800/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgrailT800/subscriptions","organizations_url":"https://api.github.com/users/AgrailT800/orgs","repos_url":"https://api.github.com/users/AgrailT800/repos","events_url":"https://api.github.com/users/AgrailT800/events{/privacy}","received_events_url":"https://api.github.com/users/AgrailT800/received_events","type":"User","site_admin":false},"repo":{"id":38356123,"name":"flashcards","full_name":"AgrailT800/flashcards","owner":{"login":"AgrailT800","id":7202029,"avatar_url":"https://avatars.githubusercontent.com/u/7202029?v=3","gravatar_id":"","url":"https://api.github.com/users/AgrailT800","html_url":"https://github.com/AgrailT800","followers_url":"https://api.github.com/users/AgrailT800/followers","following_url":"https://api.github.com/users/AgrailT800/following{/other_user}","gists_url":"https://api.github.com/users/AgrailT800/gists{/gist_id}","starred_url":"https://api.github.com/users/AgrailT800/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgrailT800/subscriptions","organizations_url":"https://api.github.com/users/AgrailT800/orgs","repos_url":"https://api.github.com/users/AgrailT800/repos","events_url":"https://api.github.com/users/AgrailT800/events{/privacy}","received_events_url":"https://api.github.com/users/AgrailT800/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AgrailT800/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/AgrailT800/flashcards","forks_url":"https://api.github.com/repos/AgrailT800/flashcards/forks","keys_url":"https://api.github.com/repos/AgrailT800/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AgrailT800/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AgrailT800/flashcards/teams","hooks_url":"https://api.github.com/repos/AgrailT800/flashcards/hooks","issue_events_url":"https://api.github.com/repos/AgrailT800/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/AgrailT800/flashcards/events","assignees_url":"https://api.github.com/repos/AgrailT800/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/AgrailT800/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/AgrailT800/flashcards/tags","blobs_url":"https://api.github.com/repos/AgrailT800/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AgrailT800/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AgrailT800/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/AgrailT800/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AgrailT800/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/AgrailT800/flashcards/languages","stargazers_url":"https://api.github.com/repos/AgrailT800/flashcards/stargazers","contributors_url":"https://api.github.com/repos/AgrailT800/flashcards/contributors","subscribers_url":"https://api.github.com/repos/AgrailT800/flashcards/subscribers","subscription_url":"https://api.github.com/repos/AgrailT800/flashcards/subscription","commits_url":"https://api.github.com/repos/AgrailT800/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/AgrailT800/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/AgrailT800/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/AgrailT800/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/AgrailT800/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/AgrailT800/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AgrailT800/flashcards/merges","archive_url":"https://api.github.com/repos/AgrailT800/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AgrailT800/flashcards/downloads","issues_url":"https://api.github.com/repos/AgrailT800/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/AgrailT800/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/AgrailT800/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/AgrailT800/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AgrailT800/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/AgrailT800/flashcards/releases{/id}","created_at":"2015-07-01T07:20:36Z","updated_at":"2015-07-02T13:56:07Z","pushed_at":"2015-07-26T15:56:57Z","git_url":"git://github.com/AgrailT800/flashcards.git","ssh_url":"git@github.com:AgrailT800/flashcards.git","clone_url":"https://github.com/AgrailT800/flashcards.git","svn_url":"https://github.com/AgrailT800/flashcards","homepage":null,"size":684,"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":"AgrailT800:master","ref":"master","sha":"41431783f4ae5678db53d6954c6f92a021eaad75","user":{"login":"AgrailT800","id":7202029,"avatar_url":"https://avatars.githubusercontent.com/u/7202029?v=3","gravatar_id":"","url":"https://api.github.com/users/AgrailT800","html_url":"https://github.com/AgrailT800","followers_url":"https://api.github.com/users/AgrailT800/followers","following_url":"https://api.github.com/users/AgrailT800/following{/other_user}","gists_url":"https://api.github.com/users/AgrailT800/gists{/gist_id}","starred_url":"https://api.github.com/users/AgrailT800/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgrailT800/subscriptions","organizations_url":"https://api.github.com/users/AgrailT800/orgs","repos_url":"https://api.github.com/users/AgrailT800/repos","events_url":"https://api.github.com/users/AgrailT800/events{/privacy}","received_events_url":"https://api.github.com/users/AgrailT800/received_events","type":"User","site_admin":false},"repo":{"id":38356123,"name":"flashcards","full_name":"AgrailT800/flashcards","owner":{"login":"AgrailT800","id":7202029,"avatar_url":"https://avatars.githubusercontent.com/u/7202029?v=3","gravatar_id":"","url":"https://api.github.com/users/AgrailT800","html_url":"https://github.com/AgrailT800","followers_url":"https://api.github.com/users/AgrailT800/followers","following_url":"https://api.github.com/users/AgrailT800/following{/other_user}","gists_url":"https://api.github.com/users/AgrailT800/gists{/gist_id}","starred_url":"https://api.github.com/users/AgrailT800/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgrailT800/subscriptions","organizations_url":"https://api.github.com/users/AgrailT800/orgs","repos_url":"https://api.github.com/users/AgrailT800/repos","events_url":"https://api.github.com/users/AgrailT800/events{/privacy}","received_events_url":"https://api.github.com/users/AgrailT800/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AgrailT800/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/AgrailT800/flashcards","forks_url":"https://api.github.com/repos/AgrailT800/flashcards/forks","keys_url":"https://api.github.com/repos/AgrailT800/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AgrailT800/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AgrailT800/flashcards/teams","hooks_url":"https://api.github.com/repos/AgrailT800/flashcards/hooks","issue_events_url":"https://api.github.com/repos/AgrailT800/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/AgrailT800/flashcards/events","assignees_url":"https://api.github.com/repos/AgrailT800/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/AgrailT800/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/AgrailT800/flashcards/tags","blobs_url":"https://api.github.com/repos/AgrailT800/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AgrailT800/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AgrailT800/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/AgrailT800/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AgrailT800/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/AgrailT800/flashcards/languages","stargazers_url":"https://api.github.com/repos/AgrailT800/flashcards/stargazers","contributors_url":"https://api.github.com/repos/AgrailT800/flashcards/contributors","subscribers_url":"https://api.github.com/repos/AgrailT800/flashcards/subscribers","subscription_url":"https://api.github.com/repos/AgrailT800/flashcards/subscription","commits_url":"https://api.github.com/repos/AgrailT800/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/AgrailT800/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/AgrailT800/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/AgrailT800/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/AgrailT800/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/AgrailT800/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AgrailT800/flashcards/merges","archive_url":"https://api.github.com/repos/AgrailT800/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AgrailT800/flashcards/downloads","issues_url":"https://api.github.com/repos/AgrailT800/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/AgrailT800/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/AgrailT800/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/AgrailT800/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AgrailT800/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/AgrailT800/flashcards/releases{/id}","created_at":"2015-07-01T07:20:36Z","updated_at":"2015-07-02T13:56:07Z","pushed_at":"2015-07-26T15:56:57Z","git_url":"git://github.com/AgrailT800/flashcards.git","ssh_url":"git@github.com:AgrailT800/flashcards.git","clone_url":"https://github.com/AgrailT800/flashcards.git","svn_url":"https://github.com/AgrailT800/flashcards","homepage":null,"size":684,"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/AgrailT800/flashcards/pulls/16"},"html":{"href":"https://github.com/AgrailT800/flashcards/pull/16"},"issue":{"href":"https://api.github.com/repos/AgrailT800/flashcards/issues/16"},"comments":{"href":"https://api.github.com/repos/AgrailT800/flashcards/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/AgrailT800/flashcards/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/AgrailT800/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AgrailT800/flashcards/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/AgrailT800/flashcards/statuses/0206e14dfef383c450e8c1173743aba9c004a47e"}}}}