{"action":"created","comment":{"url":"https://api.github.com/repos/beauties-beast/barker-secudev/pulls/comments/40491129","id":40491129,"diff_hunk":"@@ -101,4 +105,103 @@ def viewuser\n       session[:errors] = [\"Can't find user id #{id}.\"]\n     end\n   end\n+\n+  def search\n+    query = params[:query] ? params[:query] : \"\"\n+    index = params[:index] ? params[:index] : \"\"\n+    i = index.split(/,/)\n+\n+    conditions  = String.new\n+    values      = Array.new\n+\n+    conditions << 'content LIKE ?'\n+    values << '%'+query+'%'\n+    \n+    i.each do |a|\n+      adv_search = String.new\n+      andor = String.new\n+      crit = String.new\n+      startdate = String.new\n+      r = String.new\n+      enddate = String.new\n+\n+      andor << \"andor\"+a","path":"app/controllers/application_controller.rb","position":35,"original_position":35,"commit_id":"a510c17528075c40d8b86bbdb957ede209a927e5","original_commit_id":"a510c17528075c40d8b86bbdb957ede209a927e5","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Surrounding space missing for operator '+'.","created_at":"2015-09-26T07:23:57Z","updated_at":"2015-09-26T07:23:57Z","html_url":"https://github.com/beauties-beast/barker-secudev/pull/13#discussion_r40491129","pull_request_url":"https://api.github.com/repos/beauties-beast/barker-secudev/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/beauties-beast/barker-secudev/pulls/comments/40491129"},"html":{"href":"https://github.com/beauties-beast/barker-secudev/pull/13#discussion_r40491129"},"pull_request":{"href":"https://api.github.com/repos/beauties-beast/barker-secudev/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/beauties-beast/barker-secudev/pulls/13","id":46077319,"html_url":"https://github.com/beauties-beast/barker-secudev/pull/13","diff_url":"https://github.com/beauties-beast/barker-secudev/pull/13.diff","patch_url":"https://github.com/beauties-beast/barker-secudev/pull/13.patch","issue_url":"https://api.github.com/repos/beauties-beast/barker-secudev/issues/13","number":13,"state":"open","locked":false,"title":"Adv search","user":{"login":"deannechan","id":8191618,"avatar_url":"https://avatars.githubusercontent.com/u/8191618?v=3","gravatar_id":"","url":"https://api.github.com/users/deannechan","html_url":"https://github.com/deannechan","followers_url":"https://api.github.com/users/deannechan/followers","following_url":"https://api.github.com/users/deannechan/following{/other_user}","gists_url":"https://api.github.com/users/deannechan/gists{/gist_id}","starred_url":"https://api.github.com/users/deannechan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deannechan/subscriptions","organizations_url":"https://api.github.com/users/deannechan/orgs","repos_url":"https://api.github.com/users/deannechan/repos","events_url":"https://api.github.com/users/deannechan/events{/privacy}","received_events_url":"https://api.github.com/users/deannechan/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-26T07:23:44Z","updated_at":"2015-09-26T07:23:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/beauties-beast/barker-secudev/pulls/13/commits","review_comments_url":"https://api.github.com/repos/beauties-beast/barker-secudev/pulls/13/comments","review_comment_url":"https://api.github.com/repos/beauties-beast/barker-secudev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/beauties-beast/barker-secudev/issues/13/comments","statuses_url":"https://api.github.com/repos/beauties-beast/barker-secudev/statuses/a510c17528075c40d8b86bbdb957ede209a927e5","head":{"label":"beauties-beast:adv-search","ref":"adv-search","sha":"a510c17528075c40d8b86bbdb957ede209a927e5","user":{"login":"beauties-beast","id":13806071,"avatar_url":"https://avatars.githubusercontent.com/u/13806071?v=3","gravatar_id":"","url":"https://api.github.com/users/beauties-beast","html_url":"https://github.com/beauties-beast","followers_url":"https://api.github.com/users/beauties-beast/followers","following_url":"https://api.github.com/users/beauties-beast/following{/other_user}","gists_url":"https://api.github.com/users/beauties-beast/gists{/gist_id}","starred_url":"https://api.github.com/users/beauties-beast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beauties-beast/subscriptions","organizations_url":"https://api.github.com/users/beauties-beast/orgs","repos_url":"https://api.github.com/users/beauties-beast/repos","events_url":"https://api.github.com/users/beauties-beast/events{/privacy}","received_events_url":"https://api.github.com/users/beauties-beast/received_events","type":"Organization","site_admin":false},"repo":{"id":41613810,"name":"barker-secudev","full_name":"beauties-beast/barker-secudev","owner":{"login":"beauties-beast","id":13806071,"avatar_url":"https://avatars.githubusercontent.com/u/13806071?v=3","gravatar_id":"","url":"https://api.github.com/users/beauties-beast","html_url":"https://github.com/beauties-beast","followers_url":"https://api.github.com/users/beauties-beast/followers","following_url":"https://api.github.com/users/beauties-beast/following{/other_user}","gists_url":"https://api.github.com/users/beauties-beast/gists{/gist_id}","starred_url":"https://api.github.com/users/beauties-beast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beauties-beast/subscriptions","organizations_url":"https://api.github.com/users/beauties-beast/orgs","repos_url":"https://api.github.com/users/beauties-beast/repos","events_url":"https://api.github.com/users/beauties-beast/events{/privacy}","received_events_url":"https://api.github.com/users/beauties-beast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/beauties-beast/barker-secudev","description":"Barker is a Twitter-like Rails app made for Secure Development under Mr. Solomon See.","fork":false,"url":"https://api.github.com/repos/beauties-beast/barker-secudev","forks_url":"https://api.github.com/repos/beauties-beast/barker-secudev/forks","keys_url":"https://api.github.com/repos/beauties-beast/barker-secudev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/beauties-beast/barker-secudev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/beauties-beast/barker-secudev/teams","hooks_url":"https://api.github.com/repos/beauties-beast/barker-secudev/hooks","issue_events_url":"https://api.github.com/repos/beauties-beast/barker-secudev/issues/events{/number}","events_url":"https://api.github.com/repos/beauties-beast/barker-secudev/events","assignees_url":"https://api.github.com/repos/beauties-beast/barker-secudev/assignees{/user}","branches_url":"https://api.github.com/repos/beauties-beast/barker-secudev/branches{/branch}","tags_url":"https://api.github.com/repos/beauties-beast/barker-secudev/tags","blobs_url":"https://api.github.com/repos/beauties-beast/barker-secudev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/beauties-beast/barker-secudev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/beauties-beast/barker-secudev/git/refs{/sha}","trees_url":"https://api.github.com/repos/beauties-beast/barker-secudev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/beauties-beast/barker-secudev/statuses/{sha}","languages_url":"https://api.github.com/repos/beauties-beast/barker-secudev/languages","stargazers_url":"https://api.github.com/repos/beauties-beast/barker-secudev/stargazers","contributors_url":"https://api.github.com/repos/beauties-beast/barker-secudev/contributors","subscribers_url":"https://api.github.com/repos/beauties-beast/barker-secudev/subscribers","subscription_url":"https://api.github.com/repos/beauties-beast/barker-secudev/subscription","commits_url":"https://api.github.com/repos/beauties-beast/barker-secudev/commits{/sha}","git_commits_url":"https://api.github.com/repos/beauties-beast/barker-secudev/git/commits{/sha}","comments_url":"https://api.github.com/repos/beauties-beast/barker-secudev/comments{/number}","issue_comment_url":"https://api.github.com/repos/beauties-beast/barker-secudev/issues/comments{/number}","contents_url":"https://api.github.com/repos/beauties-beast/barker-secudev/contents/{+path}","compare_url":"https://api.github.com/repos/beauties-beast/barker-secudev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/beauties-beast/barker-secudev/merges","archive_url":"https://api.github.com/repos/beauties-beast/barker-secudev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/beauties-beast/barker-secudev/downloads","issues_url":"https://api.github.com/repos/beauties-beast/barker-secudev/issues{/number}","pulls_url":"https://api.github.com/repos/beauties-beast/barker-secudev/pulls{/number}","milestones_url":"https://api.github.com/repos/beauties-beast/barker-secudev/milestones{/number}","notifications_url":"https://api.github.com/repos/beauties-beast/barker-secudev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/beauties-beast/barker-secudev/labels{/name}","releases_url":"https://api.github.com/repos/beauties-beast/barker-secudev/releases{/id}","created_at":"2015-08-30T02:15:41Z","updated_at":"2015-09-09T14:48:09Z","pushed_at":"2015-09-26T07:23:44Z","git_url":"git://github.com/beauties-beast/barker-secudev.git","ssh_url":"git@github.com:beauties-beast/barker-secudev.git","clone_url":"https://github.com/beauties-beast/barker-secudev.git","svn_url":"https://github.com/beauties-beast/barker-secudev","homepage":"","size":924,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"beauties-beast:master","ref":"master","sha":"d7a97b7ca8d14b5b72a6a44f772ecb97ad2f49f8","user":{"login":"beauties-beast","id":13806071,"avatar_url":"https://avatars.githubusercontent.com/u/13806071?v=3","gravatar_id":"","url":"https://api.github.com/users/beauties-beast","html_url":"https://github.com/beauties-beast","followers_url":"https://api.github.com/users/beauties-beast/followers","following_url":"https://api.github.com/users/beauties-beast/following{/other_user}","gists_url":"https://api.github.com/users/beauties-beast/gists{/gist_id}","starred_url":"https://api.github.com/users/beauties-beast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beauties-beast/subscriptions","organizations_url":"https://api.github.com/users/beauties-beast/orgs","repos_url":"https://api.github.com/users/beauties-beast/repos","events_url":"https://api.github.com/users/beauties-beast/events{/privacy}","received_events_url":"https://api.github.com/users/beauties-beast/received_events","type":"Organization","site_admin":false},"repo":{"id":41613810,"name":"barker-secudev","full_name":"beauties-beast/barker-secudev","owner":{"login":"beauties-beast","id":13806071,"avatar_url":"https://avatars.githubusercontent.com/u/13806071?v=3","gravatar_id":"","url":"https://api.github.com/users/beauties-beast","html_url":"https://github.com/beauties-beast","followers_url":"https://api.github.com/users/beauties-beast/followers","following_url":"https://api.github.com/users/beauties-beast/following{/other_user}","gists_url":"https://api.github.com/users/beauties-beast/gists{/gist_id}","starred_url":"https://api.github.com/users/beauties-beast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beauties-beast/subscriptions","organizations_url":"https://api.github.com/users/beauties-beast/orgs","repos_url":"https://api.github.com/users/beauties-beast/repos","events_url":"https://api.github.com/users/beauties-beast/events{/privacy}","received_events_url":"https://api.github.com/users/beauties-beast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/beauties-beast/barker-secudev","description":"Barker is a Twitter-like Rails app made for Secure Development under Mr. Solomon See.","fork":false,"url":"https://api.github.com/repos/beauties-beast/barker-secudev","forks_url":"https://api.github.com/repos/beauties-beast/barker-secudev/forks","keys_url":"https://api.github.com/repos/beauties-beast/barker-secudev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/beauties-beast/barker-secudev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/beauties-beast/barker-secudev/teams","hooks_url":"https://api.github.com/repos/beauties-beast/barker-secudev/hooks","issue_events_url":"https://api.github.com/repos/beauties-beast/barker-secudev/issues/events{/number}","events_url":"https://api.github.com/repos/beauties-beast/barker-secudev/events","assignees_url":"https://api.github.com/repos/beauties-beast/barker-secudev/assignees{/user}","branches_url":"https://api.github.com/repos/beauties-beast/barker-secudev/branches{/branch}","tags_url":"https://api.github.com/repos/beauties-beast/barker-secudev/tags","blobs_url":"https://api.github.com/repos/beauties-beast/barker-secudev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/beauties-beast/barker-secudev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/beauties-beast/barker-secudev/git/refs{/sha}","trees_url":"https://api.github.com/repos/beauties-beast/barker-secudev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/beauties-beast/barker-secudev/statuses/{sha}","languages_url":"https://api.github.com/repos/beauties-beast/barker-secudev/languages","stargazers_url":"https://api.github.com/repos/beauties-beast/barker-secudev/stargazers","contributors_url":"https://api.github.com/repos/beauties-beast/barker-secudev/contributors","subscribers_url":"https://api.github.com/repos/beauties-beast/barker-secudev/subscribers","subscription_url":"https://api.github.com/repos/beauties-beast/barker-secudev/subscription","commits_url":"https://api.github.com/repos/beauties-beast/barker-secudev/commits{/sha}","git_commits_url":"https://api.github.com/repos/beauties-beast/barker-secudev/git/commits{/sha}","comments_url":"https://api.github.com/repos/beauties-beast/barker-secudev/comments{/number}","issue_comment_url":"https://api.github.com/repos/beauties-beast/barker-secudev/issues/comments{/number}","contents_url":"https://api.github.com/repos/beauties-beast/barker-secudev/contents/{+path}","compare_url":"https://api.github.com/repos/beauties-beast/barker-secudev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/beauties-beast/barker-secudev/merges","archive_url":"https://api.github.com/repos/beauties-beast/barker-secudev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/beauties-beast/barker-secudev/downloads","issues_url":"https://api.github.com/repos/beauties-beast/barker-secudev/issues{/number}","pulls_url":"https://api.github.com/repos/beauties-beast/barker-secudev/pulls{/number}","milestones_url":"https://api.github.com/repos/beauties-beast/barker-secudev/milestones{/number}","notifications_url":"https://api.github.com/repos/beauties-beast/barker-secudev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/beauties-beast/barker-secudev/labels{/name}","releases_url":"https://api.github.com/repos/beauties-beast/barker-secudev/releases{/id}","created_at":"2015-08-30T02:15:41Z","updated_at":"2015-09-09T14:48:09Z","pushed_at":"2015-09-26T07:23:44Z","git_url":"git://github.com/beauties-beast/barker-secudev.git","ssh_url":"git@github.com:beauties-beast/barker-secudev.git","clone_url":"https://github.com/beauties-beast/barker-secudev.git","svn_url":"https://github.com/beauties-beast/barker-secudev","homepage":"","size":924,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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/beauties-beast/barker-secudev/pulls/13"},"html":{"href":"https://github.com/beauties-beast/barker-secudev/pull/13"},"issue":{"href":"https://api.github.com/repos/beauties-beast/barker-secudev/issues/13"},"comments":{"href":"https://api.github.com/repos/beauties-beast/barker-secudev/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/beauties-beast/barker-secudev/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/beauties-beast/barker-secudev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/beauties-beast/barker-secudev/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/beauties-beast/barker-secudev/statuses/a510c17528075c40d8b86bbdb957ede209a927e5"}}}}