{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/RHS/pulls/comments/35402683","id":35402683,"diff_hunk":"@@ -25,5 +25,21 @@ def simplify_price\n \n   def average_point\n     reviews.average :point\n+  scope :order_by_colunm, ->object do\n+    if object == Settings.sorts.title\n+      order :title\n+    elsif object == Settings.sorts.price_low_high\n+      order \"price ASC\"\n+    elsif object == Settings.sorts.price_high_low\n+      order \"price DESC\"\n+    elsif object == Settings.sorts.square_small_big\n+      order \"square ASC\"\n+    elsif object == Settings.sorts.square_big_small\n+      order \"square DESC\"\n+    elsif object == Settings.sorts.capacity_low_high\n+      order \"capacity ASC\"\n+    elsif object == Settings.sorts.capacity_high_low\n+      order \"capacity DESC\"\n+    end \n   end","path":"app/models/address.rb","position":20,"original_position":20,"commit_id":"e4fe40b53c16492b8e492144817479cd4660cfd6","original_commit_id":"e4fe40b53c16492b8e492144817479cd4660cfd6","user":{"login":"cuongnguyen2503","id":9583215,"avatar_url":"https://avatars.githubusercontent.com/u/9583215?v=3","gravatar_id":"","url":"https://api.github.com/users/cuongnguyen2503","html_url":"https://github.com/cuongnguyen2503","followers_url":"https://api.github.com/users/cuongnguyen2503/followers","following_url":"https://api.github.com/users/cuongnguyen2503/following{/other_user}","gists_url":"https://api.github.com/users/cuongnguyen2503/gists{/gist_id}","starred_url":"https://api.github.com/users/cuongnguyen2503/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuongnguyen2503/subscriptions","organizations_url":"https://api.github.com/users/cuongnguyen2503/orgs","repos_url":"https://api.github.com/users/cuongnguyen2503/repos","events_url":"https://api.github.com/users/cuongnguyen2503/events{/privacy}","received_events_url":"https://api.github.com/users/cuongnguyen2503/received_events","type":"User","site_admin":false},"body":"unexpected end of input. Should add end keyword.","created_at":"2015-07-24T08:04:33Z","updated_at":"2015-07-24T08:04:33Z","html_url":"https://github.com/framgia/RHS/pull/74#discussion_r35402683","pull_request_url":"https://api.github.com/repos/framgia/RHS/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/framgia/RHS/pulls/comments/35402683"},"html":{"href":"https://github.com/framgia/RHS/pull/74#discussion_r35402683"},"pull_request":{"href":"https://api.github.com/repos/framgia/RHS/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/RHS/pulls/74","id":40652370,"html_url":"https://github.com/framgia/RHS/pull/74","diff_url":"https://github.com/framgia/RHS/pull/74.diff","patch_url":"https://github.com/framgia/RHS/pull/74.patch","issue_url":"https://api.github.com/repos/framgia/RHS/issues/74","number":74,"state":"open","locked":false,"title":"show_profile_normal_user","user":{"login":"samnangcattor","id":8875045,"avatar_url":"https://avatars.githubusercontent.com/u/8875045?v=3","gravatar_id":"","url":"https://api.github.com/users/samnangcattor","html_url":"https://github.com/samnangcattor","followers_url":"https://api.github.com/users/samnangcattor/followers","following_url":"https://api.github.com/users/samnangcattor/following{/other_user}","gists_url":"https://api.github.com/users/samnangcattor/gists{/gist_id}","starred_url":"https://api.github.com/users/samnangcattor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samnangcattor/subscriptions","organizations_url":"https://api.github.com/users/samnangcattor/orgs","repos_url":"https://api.github.com/users/samnangcattor/repos","events_url":"https://api.github.com/users/samnangcattor/events{/privacy}","received_events_url":"https://api.github.com/users/samnangcattor/received_events","type":"User","site_admin":false},"body":"- Show profile normal user\r\n- Can search by Title in rental house of user\r\n","created_at":"2015-07-23T09:27:08Z","updated_at":"2015-07-24T08:04:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e5d415481cbe3799898246a4abdc09ef43394e97","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/RHS/pulls/74/commits","review_comments_url":"https://api.github.com/repos/framgia/RHS/pulls/74/comments","review_comment_url":"https://api.github.com/repos/framgia/RHS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/RHS/issues/74/comments","statuses_url":"https://api.github.com/repos/framgia/RHS/statuses/e4fe40b53c16492b8e492144817479cd4660cfd6","head":{"label":"samnangcattor:show_profile_normal_user","ref":"show_profile_normal_user","sha":"e4fe40b53c16492b8e492144817479cd4660cfd6","user":{"login":"samnangcattor","id":8875045,"avatar_url":"https://avatars.githubusercontent.com/u/8875045?v=3","gravatar_id":"","url":"https://api.github.com/users/samnangcattor","html_url":"https://github.com/samnangcattor","followers_url":"https://api.github.com/users/samnangcattor/followers","following_url":"https://api.github.com/users/samnangcattor/following{/other_user}","gists_url":"https://api.github.com/users/samnangcattor/gists{/gist_id}","starred_url":"https://api.github.com/users/samnangcattor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samnangcattor/subscriptions","organizations_url":"https://api.github.com/users/samnangcattor/orgs","repos_url":"https://api.github.com/users/samnangcattor/repos","events_url":"https://api.github.com/users/samnangcattor/events{/privacy}","received_events_url":"https://api.github.com/users/samnangcattor/received_events","type":"User","site_admin":false},"repo":{"id":38873266,"name":"RHS","full_name":"samnangcattor/RHS","owner":{"login":"samnangcattor","id":8875045,"avatar_url":"https://avatars.githubusercontent.com/u/8875045?v=3","gravatar_id":"","url":"https://api.github.com/users/samnangcattor","html_url":"https://github.com/samnangcattor","followers_url":"https://api.github.com/users/samnangcattor/followers","following_url":"https://api.github.com/users/samnangcattor/following{/other_user}","gists_url":"https://api.github.com/users/samnangcattor/gists{/gist_id}","starred_url":"https://api.github.com/users/samnangcattor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samnangcattor/subscriptions","organizations_url":"https://api.github.com/users/samnangcattor/orgs","repos_url":"https://api.github.com/users/samnangcattor/repos","events_url":"https://api.github.com/users/samnangcattor/events{/privacy}","received_events_url":"https://api.github.com/users/samnangcattor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samnangcattor/RHS","description":"Rental House Advisor System","fork":true,"url":"https://api.github.com/repos/samnangcattor/RHS","forks_url":"https://api.github.com/repos/samnangcattor/RHS/forks","keys_url":"https://api.github.com/repos/samnangcattor/RHS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samnangcattor/RHS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samnangcattor/RHS/teams","hooks_url":"https://api.github.com/repos/samnangcattor/RHS/hooks","issue_events_url":"https://api.github.com/repos/samnangcattor/RHS/issues/events{/number}","events_url":"https://api.github.com/repos/samnangcattor/RHS/events","assignees_url":"https://api.github.com/repos/samnangcattor/RHS/assignees{/user}","branches_url":"https://api.github.com/repos/samnangcattor/RHS/branches{/branch}","tags_url":"https://api.github.com/repos/samnangcattor/RHS/tags","blobs_url":"https://api.github.com/repos/samnangcattor/RHS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samnangcattor/RHS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samnangcattor/RHS/git/refs{/sha}","trees_url":"https://api.github.com/repos/samnangcattor/RHS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samnangcattor/RHS/statuses/{sha}","languages_url":"https://api.github.com/repos/samnangcattor/RHS/languages","stargazers_url":"https://api.github.com/repos/samnangcattor/RHS/stargazers","contributors_url":"https://api.github.com/repos/samnangcattor/RHS/contributors","subscribers_url":"https://api.github.com/repos/samnangcattor/RHS/subscribers","subscription_url":"https://api.github.com/repos/samnangcattor/RHS/subscription","commits_url":"https://api.github.com/repos/samnangcattor/RHS/commits{/sha}","git_commits_url":"https://api.github.com/repos/samnangcattor/RHS/git/commits{/sha}","comments_url":"https://api.github.com/repos/samnangcattor/RHS/comments{/number}","issue_comment_url":"https://api.github.com/repos/samnangcattor/RHS/issues/comments{/number}","contents_url":"https://api.github.com/repos/samnangcattor/RHS/contents/{+path}","compare_url":"https://api.github.com/repos/samnangcattor/RHS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samnangcattor/RHS/merges","archive_url":"https://api.github.com/repos/samnangcattor/RHS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samnangcattor/RHS/downloads","issues_url":"https://api.github.com/repos/samnangcattor/RHS/issues{/number}","pulls_url":"https://api.github.com/repos/samnangcattor/RHS/pulls{/number}","milestones_url":"https://api.github.com/repos/samnangcattor/RHS/milestones{/number}","notifications_url":"https://api.github.com/repos/samnangcattor/RHS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samnangcattor/RHS/labels{/name}","releases_url":"https://api.github.com/repos/samnangcattor/RHS/releases{/id}","created_at":"2015-07-10T09:44:54Z","updated_at":"2015-07-07T03:15:57Z","pushed_at":"2015-07-24T07:55:04Z","git_url":"git://github.com/samnangcattor/RHS.git","ssh_url":"git@github.com:samnangcattor/RHS.git","clone_url":"https://github.com/samnangcattor/RHS.git","svn_url":"https://github.com/samnangcattor/RHS","homepage":null,"size":518,"stargazers_count":0,"watchers_count":0,"language":null,"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":"develop"}},"base":{"label":"framgia:develop","ref":"develop","sha":"04a531f7b46d2778c3ffc9855006ad5ba49067d5","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":38661129,"name":"RHS","full_name":"framgia/RHS","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/RHS","description":"Rental House Advisor System","fork":false,"url":"https://api.github.com/repos/framgia/RHS","forks_url":"https://api.github.com/repos/framgia/RHS/forks","keys_url":"https://api.github.com/repos/framgia/RHS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/RHS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/RHS/teams","hooks_url":"https://api.github.com/repos/framgia/RHS/hooks","issue_events_url":"https://api.github.com/repos/framgia/RHS/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/RHS/events","assignees_url":"https://api.github.com/repos/framgia/RHS/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/RHS/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/RHS/tags","blobs_url":"https://api.github.com/repos/framgia/RHS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/RHS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/RHS/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/RHS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/RHS/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/RHS/languages","stargazers_url":"https://api.github.com/repos/framgia/RHS/stargazers","contributors_url":"https://api.github.com/repos/framgia/RHS/contributors","subscribers_url":"https://api.github.com/repos/framgia/RHS/subscribers","subscription_url":"https://api.github.com/repos/framgia/RHS/subscription","commits_url":"https://api.github.com/repos/framgia/RHS/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/RHS/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/RHS/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/RHS/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/RHS/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/RHS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/RHS/merges","archive_url":"https://api.github.com/repos/framgia/RHS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/RHS/downloads","issues_url":"https://api.github.com/repos/framgia/RHS/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/RHS/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/RHS/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/RHS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/RHS/labels{/name}","releases_url":"https://api.github.com/repos/framgia/RHS/releases{/id}","created_at":"2015-07-07T03:15:57Z","updated_at":"2015-07-07T03:15:57Z","pushed_at":"2015-07-24T08:04:27Z","git_url":"git://github.com/framgia/RHS.git","ssh_url":"git@github.com:framgia/RHS.git","clone_url":"https://github.com/framgia/RHS.git","svn_url":"https://github.com/framgia/RHS","homepage":null,"size":2215,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":17,"forks":17,"open_issues":17,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/RHS/pulls/74"},"html":{"href":"https://github.com/framgia/RHS/pull/74"},"issue":{"href":"https://api.github.com/repos/framgia/RHS/issues/74"},"comments":{"href":"https://api.github.com/repos/framgia/RHS/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/RHS/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/RHS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/RHS/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/RHS/statuses/e4fe40b53c16492b8e492144817479cd4660cfd6"}}}}