{"action":"created","comment":{"url":"https://api.github.com/repos/vessi/converter_kottans/pulls/comments/25884176","id":25884176,"diff_hunk":"@@ -7,22 +7,21 @@ class ProcessController < BaseController\n       end\n     end\n \n-    def c2f\n-      respond_to do |format|\n-        format.json { render json: {value: degree_model(:celsium).to_farengheit } }\n-      end\n-    end\n \n-    def f2c\n+    def calculate\n       respond_to do |format|\n-        format.json { render json: {value: degree_model(:farengheit).to_celsium } }\n+        format.json { render json: { value: get_result } }\n       end\n     end\n \n     private\n \n-    def degree_model type\n-      ::Degree.new(params[:value].to_f, type)\n+    def degree_model (type, outtype)\n+      ::Degree.new(params[:value].to_f, type, outtype)\n+    end\n+\n+    def get_result\n+      degree_model(params[:from].to_sym, params[:to].to_sym).send(\"to_#{@outtype}\".to_sym)","path":"app/controllers/convert/process_controller.rb","position":27,"original_position":27,"commit_id":"9be55ca656e77dfc71ffb6c0f483ed65abfe7407","original_commit_id":"9be55ca656e77dfc71ffb6c0f483ed65abfe7407","user":{"login":"vessi","id":905126,"avatar_url":"https://avatars.githubusercontent.com/u/905126?v=3","gravatar_id":"","url":"https://api.github.com/users/vessi","html_url":"https://github.com/vessi","followers_url":"https://api.github.com/users/vessi/followers","following_url":"https://api.github.com/users/vessi/following{/other_user}","gists_url":"https://api.github.com/users/vessi/gists{/gist_id}","starred_url":"https://api.github.com/users/vessi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vessi/subscriptions","organizations_url":"https://api.github.com/users/vessi/orgs","repos_url":"https://api.github.com/users/vessi/repos","events_url":"https://api.github.com/users/vessi/events{/privacy}","received_events_url":"https://api.github.com/users/vessi/received_events","type":"User","site_admin":false},"body":"```ruby\r\n  degree_model(params[:from].to_sym, params[:to].to_sym).convert\r\n```","created_at":"2015-03-05T17:44:39Z","updated_at":"2015-03-05T17:44:39Z","html_url":"https://github.com/vessi/converter_kottans/pull/2#discussion_r25884176","pull_request_url":"https://api.github.com/repos/vessi/converter_kottans/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/vessi/converter_kottans/pulls/comments/25884176"},"html":{"href":"https://github.com/vessi/converter_kottans/pull/2#discussion_r25884176"},"pull_request":{"href":"https://api.github.com/repos/vessi/converter_kottans/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/vessi/converter_kottans/pulls/2","id":30510097,"html_url":"https://github.com/vessi/converter_kottans/pull/2","diff_url":"https://github.com/vessi/converter_kottans/pull/2.diff","patch_url":"https://github.com/vessi/converter_kottans/pull/2.patch","issue_url":"https://api.github.com/repos/vessi/converter_kottans/issues/2","number":2,"state":"open","locked":false,"title":"Made some changes","user":{"login":"grBro","id":8741712,"avatar_url":"https://avatars.githubusercontent.com/u/8741712?v=3","gravatar_id":"","url":"https://api.github.com/users/grBro","html_url":"https://github.com/grBro","followers_url":"https://api.github.com/users/grBro/followers","following_url":"https://api.github.com/users/grBro/following{/other_user}","gists_url":"https://api.github.com/users/grBro/gists{/gist_id}","starred_url":"https://api.github.com/users/grBro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grBro/subscriptions","organizations_url":"https://api.github.com/users/grBro/orgs","repos_url":"https://api.github.com/users/grBro/repos","events_url":"https://api.github.com/users/grBro/events{/privacy}","received_events_url":"https://api.github.com/users/grBro/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-04T22:13:40Z","updated_at":"2015-03-05T17:44:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e3e0607a0873798a647f1f7ae1d8255601f870ec","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vessi/converter_kottans/pulls/2/commits","review_comments_url":"https://api.github.com/repos/vessi/converter_kottans/pulls/2/comments","review_comment_url":"https://api.github.com/repos/vessi/converter_kottans/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vessi/converter_kottans/issues/2/comments","statuses_url":"https://api.github.com/repos/vessi/converter_kottans/statuses/9be55ca656e77dfc71ffb6c0f483ed65abfe7407","head":{"label":"grBro:master","ref":"master","sha":"9be55ca656e77dfc71ffb6c0f483ed65abfe7407","user":{"login":"grBro","id":8741712,"avatar_url":"https://avatars.githubusercontent.com/u/8741712?v=3","gravatar_id":"","url":"https://api.github.com/users/grBro","html_url":"https://github.com/grBro","followers_url":"https://api.github.com/users/grBro/followers","following_url":"https://api.github.com/users/grBro/following{/other_user}","gists_url":"https://api.github.com/users/grBro/gists{/gist_id}","starred_url":"https://api.github.com/users/grBro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grBro/subscriptions","organizations_url":"https://api.github.com/users/grBro/orgs","repos_url":"https://api.github.com/users/grBro/repos","events_url":"https://api.github.com/users/grBro/events{/privacy}","received_events_url":"https://api.github.com/users/grBro/received_events","type":"User","site_admin":false},"repo":{"id":31597455,"name":"converter_kottans","full_name":"grBro/converter_kottans","owner":{"login":"grBro","id":8741712,"avatar_url":"https://avatars.githubusercontent.com/u/8741712?v=3","gravatar_id":"","url":"https://api.github.com/users/grBro","html_url":"https://github.com/grBro","followers_url":"https://api.github.com/users/grBro/followers","following_url":"https://api.github.com/users/grBro/following{/other_user}","gists_url":"https://api.github.com/users/grBro/gists{/gist_id}","starred_url":"https://api.github.com/users/grBro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grBro/subscriptions","organizations_url":"https://api.github.com/users/grBro/orgs","repos_url":"https://api.github.com/users/grBro/repos","events_url":"https://api.github.com/users/grBro/events{/privacy}","received_events_url":"https://api.github.com/users/grBro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/grBro/converter_kottans","description":"Converter","fork":true,"url":"https://api.github.com/repos/grBro/converter_kottans","forks_url":"https://api.github.com/repos/grBro/converter_kottans/forks","keys_url":"https://api.github.com/repos/grBro/converter_kottans/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grBro/converter_kottans/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grBro/converter_kottans/teams","hooks_url":"https://api.github.com/repos/grBro/converter_kottans/hooks","issue_events_url":"https://api.github.com/repos/grBro/converter_kottans/issues/events{/number}","events_url":"https://api.github.com/repos/grBro/converter_kottans/events","assignees_url":"https://api.github.com/repos/grBro/converter_kottans/assignees{/user}","branches_url":"https://api.github.com/repos/grBro/converter_kottans/branches{/branch}","tags_url":"https://api.github.com/repos/grBro/converter_kottans/tags","blobs_url":"https://api.github.com/repos/grBro/converter_kottans/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grBro/converter_kottans/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grBro/converter_kottans/git/refs{/sha}","trees_url":"https://api.github.com/repos/grBro/converter_kottans/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grBro/converter_kottans/statuses/{sha}","languages_url":"https://api.github.com/repos/grBro/converter_kottans/languages","stargazers_url":"https://api.github.com/repos/grBro/converter_kottans/stargazers","contributors_url":"https://api.github.com/repos/grBro/converter_kottans/contributors","subscribers_url":"https://api.github.com/repos/grBro/converter_kottans/subscribers","subscription_url":"https://api.github.com/repos/grBro/converter_kottans/subscription","commits_url":"https://api.github.com/repos/grBro/converter_kottans/commits{/sha}","git_commits_url":"https://api.github.com/repos/grBro/converter_kottans/git/commits{/sha}","comments_url":"https://api.github.com/repos/grBro/converter_kottans/comments{/number}","issue_comment_url":"https://api.github.com/repos/grBro/converter_kottans/issues/comments{/number}","contents_url":"https://api.github.com/repos/grBro/converter_kottans/contents/{+path}","compare_url":"https://api.github.com/repos/grBro/converter_kottans/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grBro/converter_kottans/merges","archive_url":"https://api.github.com/repos/grBro/converter_kottans/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grBro/converter_kottans/downloads","issues_url":"https://api.github.com/repos/grBro/converter_kottans/issues{/number}","pulls_url":"https://api.github.com/repos/grBro/converter_kottans/pulls{/number}","milestones_url":"https://api.github.com/repos/grBro/converter_kottans/milestones{/number}","notifications_url":"https://api.github.com/repos/grBro/converter_kottans/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grBro/converter_kottans/labels{/name}","releases_url":"https://api.github.com/repos/grBro/converter_kottans/releases{/id}","created_at":"2015-03-03T12:34:36Z","updated_at":"2015-03-04T22:11:39Z","pushed_at":"2015-03-04T22:11:39Z","git_url":"git://github.com/grBro/converter_kottans.git","ssh_url":"git@github.com:grBro/converter_kottans.git","clone_url":"https://github.com/grBro/converter_kottans.git","svn_url":"https://github.com/grBro/converter_kottans","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"vessi:master","ref":"master","sha":"960df5ba1f4d24ef15b0a3eb5ba1cef9a219c6c6","user":{"login":"vessi","id":905126,"avatar_url":"https://avatars.githubusercontent.com/u/905126?v=3","gravatar_id":"","url":"https://api.github.com/users/vessi","html_url":"https://github.com/vessi","followers_url":"https://api.github.com/users/vessi/followers","following_url":"https://api.github.com/users/vessi/following{/other_user}","gists_url":"https://api.github.com/users/vessi/gists{/gist_id}","starred_url":"https://api.github.com/users/vessi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vessi/subscriptions","organizations_url":"https://api.github.com/users/vessi/orgs","repos_url":"https://api.github.com/users/vessi/repos","events_url":"https://api.github.com/users/vessi/events{/privacy}","received_events_url":"https://api.github.com/users/vessi/received_events","type":"User","site_admin":false},"repo":{"id":31385681,"name":"converter_kottans","full_name":"vessi/converter_kottans","owner":{"login":"vessi","id":905126,"avatar_url":"https://avatars.githubusercontent.com/u/905126?v=3","gravatar_id":"","url":"https://api.github.com/users/vessi","html_url":"https://github.com/vessi","followers_url":"https://api.github.com/users/vessi/followers","following_url":"https://api.github.com/users/vessi/following{/other_user}","gists_url":"https://api.github.com/users/vessi/gists{/gist_id}","starred_url":"https://api.github.com/users/vessi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vessi/subscriptions","organizations_url":"https://api.github.com/users/vessi/orgs","repos_url":"https://api.github.com/users/vessi/repos","events_url":"https://api.github.com/users/vessi/events{/privacy}","received_events_url":"https://api.github.com/users/vessi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vessi/converter_kottans","description":"Converter","fork":false,"url":"https://api.github.com/repos/vessi/converter_kottans","forks_url":"https://api.github.com/repos/vessi/converter_kottans/forks","keys_url":"https://api.github.com/repos/vessi/converter_kottans/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vessi/converter_kottans/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vessi/converter_kottans/teams","hooks_url":"https://api.github.com/repos/vessi/converter_kottans/hooks","issue_events_url":"https://api.github.com/repos/vessi/converter_kottans/issues/events{/number}","events_url":"https://api.github.com/repos/vessi/converter_kottans/events","assignees_url":"https://api.github.com/repos/vessi/converter_kottans/assignees{/user}","branches_url":"https://api.github.com/repos/vessi/converter_kottans/branches{/branch}","tags_url":"https://api.github.com/repos/vessi/converter_kottans/tags","blobs_url":"https://api.github.com/repos/vessi/converter_kottans/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vessi/converter_kottans/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vessi/converter_kottans/git/refs{/sha}","trees_url":"https://api.github.com/repos/vessi/converter_kottans/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vessi/converter_kottans/statuses/{sha}","languages_url":"https://api.github.com/repos/vessi/converter_kottans/languages","stargazers_url":"https://api.github.com/repos/vessi/converter_kottans/stargazers","contributors_url":"https://api.github.com/repos/vessi/converter_kottans/contributors","subscribers_url":"https://api.github.com/repos/vessi/converter_kottans/subscribers","subscription_url":"https://api.github.com/repos/vessi/converter_kottans/subscription","commits_url":"https://api.github.com/repos/vessi/converter_kottans/commits{/sha}","git_commits_url":"https://api.github.com/repos/vessi/converter_kottans/git/commits{/sha}","comments_url":"https://api.github.com/repos/vessi/converter_kottans/comments{/number}","issue_comment_url":"https://api.github.com/repos/vessi/converter_kottans/issues/comments{/number}","contents_url":"https://api.github.com/repos/vessi/converter_kottans/contents/{+path}","compare_url":"https://api.github.com/repos/vessi/converter_kottans/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vessi/converter_kottans/merges","archive_url":"https://api.github.com/repos/vessi/converter_kottans/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vessi/converter_kottans/downloads","issues_url":"https://api.github.com/repos/vessi/converter_kottans/issues{/number}","pulls_url":"https://api.github.com/repos/vessi/converter_kottans/pulls{/number}","milestones_url":"https://api.github.com/repos/vessi/converter_kottans/milestones{/number}","notifications_url":"https://api.github.com/repos/vessi/converter_kottans/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vessi/converter_kottans/labels{/name}","releases_url":"https://api.github.com/repos/vessi/converter_kottans/releases{/id}","created_at":"2015-02-26T19:51:49Z","updated_at":"2015-02-26T19:52:16Z","pushed_at":"2015-02-26T19:52:16Z","git_url":"git://github.com/vessi/converter_kottans.git","ssh_url":"git@github.com:vessi/converter_kottans.git","clone_url":"https://github.com/vessi/converter_kottans.git","svn_url":"https://github.com/vessi/converter_kottans","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":2,"forks":9,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vessi/converter_kottans/pulls/2"},"html":{"href":"https://github.com/vessi/converter_kottans/pull/2"},"issue":{"href":"https://api.github.com/repos/vessi/converter_kottans/issues/2"},"comments":{"href":"https://api.github.com/repos/vessi/converter_kottans/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/vessi/converter_kottans/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/vessi/converter_kottans/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vessi/converter_kottans/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/vessi/converter_kottans/statuses/9be55ca656e77dfc71ffb6c0f483ed65abfe7407"}}}}