{"action":"created","comment":{"url":"https://api.github.com/repos/sprangular/sprangular/pulls/comments/29879470","id":29879470,"diff_hunk":"@@ -1,10 +1,13 @@\n class Sprangular::ProductsController < Sprangular::BaseController\n   def index\n-    @products = product_scope\n-    @products = @products.where(\"spree_prices.amount IS NOT NULL\").where(\"spree_prices.currency\" => current_currency) unless Spree::Config.show_products_without_price\n-    @products = @products.ransack(params[:q]).result if params[:q]\n-    @products = @products.distinct.page(params[:page]).per(params[:per_page])\n-    @cache_key = [I18n.locale, @current_user_roles.include?('admin'), current_currency, params[:q], params[:per_page], params[:per_page]]\n+    searcher = Spree::Config.searcher_class.new(params)\n+\n+    @products = searcher.retrieve_products\n+\n+    @cache_key = [I18n.locale,\n+                  @current_user_roles.include?('admin'),","path":"app/controllers/sprangular/products_controller.rb","position":13,"original_position":13,"commit_id":"a6c7a2c1ab08957c9b6982e2666efc51ee1574dd","original_commit_id":"a6c7a2c1ab08957c9b6982e2666efc51ee1574dd","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":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-05-07T18:12:17Z","updated_at":"2015-05-07T18:12:17Z","html_url":"https://github.com/sprangular/sprangular/pull/157#discussion_r29879470","pull_request_url":"https://api.github.com/repos/sprangular/sprangular/pulls/157","_links":{"self":{"href":"https://api.github.com/repos/sprangular/sprangular/pulls/comments/29879470"},"html":{"href":"https://github.com/sprangular/sprangular/pull/157#discussion_r29879470"},"pull_request":{"href":"https://api.github.com/repos/sprangular/sprangular/pulls/157"}}},"pull_request":{"url":"https://api.github.com/repos/sprangular/sprangular/pulls/157","id":34942508,"html_url":"https://github.com/sprangular/sprangular/pull/157","diff_url":"https://github.com/sprangular/sprangular/pull/157.diff","patch_url":"https://github.com/sprangular/sprangular/pull/157.patch","issue_url":"https://api.github.com/repos/sprangular/sprangular/issues/157","number":157,"state":"open","locked":false,"title":"Search Support","user":{"login":"joshnuss","id":4437,"avatar_url":"https://avatars.githubusercontent.com/u/4437?v=3","gravatar_id":"","url":"https://api.github.com/users/joshnuss","html_url":"https://github.com/joshnuss","followers_url":"https://api.github.com/users/joshnuss/followers","following_url":"https://api.github.com/users/joshnuss/following{/other_user}","gists_url":"https://api.github.com/users/joshnuss/gists{/gist_id}","starred_url":"https://api.github.com/users/joshnuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshnuss/subscriptions","organizations_url":"https://api.github.com/users/joshnuss/orgs","repos_url":"https://api.github.com/users/joshnuss/repos","events_url":"https://api.github.com/users/joshnuss/events{/privacy}","received_events_url":"https://api.github.com/users/joshnuss/received_events","type":"User","site_admin":false},"body":"- [ ] Use `Spree::Config.searcher_class` to retrieve products\r\n- [ ] Update taxonomy product lookup to use ID instead of Permalink","created_at":"2015-05-07T18:12:13Z","updated_at":"2015-05-07T18:12:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"feaccf949b2a5272916f329f283c632a9bf26784","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sprangular/sprangular/pulls/157/commits","review_comments_url":"https://api.github.com/repos/sprangular/sprangular/pulls/157/comments","review_comment_url":"https://api.github.com/repos/sprangular/sprangular/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sprangular/sprangular/issues/157/comments","statuses_url":"https://api.github.com/repos/sprangular/sprangular/statuses/a6c7a2c1ab08957c9b6982e2666efc51ee1574dd","head":{"label":"sprangular:feature/search","ref":"feature/search","sha":"a6c7a2c1ab08957c9b6982e2666efc51ee1574dd","user":{"login":"sprangular","id":10926453,"avatar_url":"https://avatars.githubusercontent.com/u/10926453?v=3","gravatar_id":"","url":"https://api.github.com/users/sprangular","html_url":"https://github.com/sprangular","followers_url":"https://api.github.com/users/sprangular/followers","following_url":"https://api.github.com/users/sprangular/following{/other_user}","gists_url":"https://api.github.com/users/sprangular/gists{/gist_id}","starred_url":"https://api.github.com/users/sprangular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprangular/subscriptions","organizations_url":"https://api.github.com/users/sprangular/orgs","repos_url":"https://api.github.com/users/sprangular/repos","events_url":"https://api.github.com/users/sprangular/events{/privacy}","received_events_url":"https://api.github.com/users/sprangular/received_events","type":"Organization","site_admin":false},"repo":{"id":22926972,"name":"sprangular","full_name":"sprangular/sprangular","owner":{"login":"sprangular","id":10926453,"avatar_url":"https://avatars.githubusercontent.com/u/10926453?v=3","gravatar_id":"","url":"https://api.github.com/users/sprangular","html_url":"https://github.com/sprangular","followers_url":"https://api.github.com/users/sprangular/followers","following_url":"https://api.github.com/users/sprangular/following{/other_user}","gists_url":"https://api.github.com/users/sprangular/gists{/gist_id}","starred_url":"https://api.github.com/users/sprangular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprangular/subscriptions","organizations_url":"https://api.github.com/users/sprangular/orgs","repos_url":"https://api.github.com/users/sprangular/repos","events_url":"https://api.github.com/users/sprangular/events{/privacy}","received_events_url":"https://api.github.com/users/sprangular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sprangular/sprangular","description":"Spree + Angular.js frontend","fork":false,"url":"https://api.github.com/repos/sprangular/sprangular","forks_url":"https://api.github.com/repos/sprangular/sprangular/forks","keys_url":"https://api.github.com/repos/sprangular/sprangular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sprangular/sprangular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sprangular/sprangular/teams","hooks_url":"https://api.github.com/repos/sprangular/sprangular/hooks","issue_events_url":"https://api.github.com/repos/sprangular/sprangular/issues/events{/number}","events_url":"https://api.github.com/repos/sprangular/sprangular/events","assignees_url":"https://api.github.com/repos/sprangular/sprangular/assignees{/user}","branches_url":"https://api.github.com/repos/sprangular/sprangular/branches{/branch}","tags_url":"https://api.github.com/repos/sprangular/sprangular/tags","blobs_url":"https://api.github.com/repos/sprangular/sprangular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sprangular/sprangular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sprangular/sprangular/git/refs{/sha}","trees_url":"https://api.github.com/repos/sprangular/sprangular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sprangular/sprangular/statuses/{sha}","languages_url":"https://api.github.com/repos/sprangular/sprangular/languages","stargazers_url":"https://api.github.com/repos/sprangular/sprangular/stargazers","contributors_url":"https://api.github.com/repos/sprangular/sprangular/contributors","subscribers_url":"https://api.github.com/repos/sprangular/sprangular/subscribers","subscription_url":"https://api.github.com/repos/sprangular/sprangular/subscription","commits_url":"https://api.github.com/repos/sprangular/sprangular/commits{/sha}","git_commits_url":"https://api.github.com/repos/sprangular/sprangular/git/commits{/sha}","comments_url":"https://api.github.com/repos/sprangular/sprangular/comments{/number}","issue_comment_url":"https://api.github.com/repos/sprangular/sprangular/issues/comments{/number}","contents_url":"https://api.github.com/repos/sprangular/sprangular/contents/{+path}","compare_url":"https://api.github.com/repos/sprangular/sprangular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sprangular/sprangular/merges","archive_url":"https://api.github.com/repos/sprangular/sprangular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sprangular/sprangular/downloads","issues_url":"https://api.github.com/repos/sprangular/sprangular/issues{/number}","pulls_url":"https://api.github.com/repos/sprangular/sprangular/pulls{/number}","milestones_url":"https://api.github.com/repos/sprangular/sprangular/milestones{/number}","notifications_url":"https://api.github.com/repos/sprangular/sprangular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sprangular/sprangular/labels{/name}","releases_url":"https://api.github.com/repos/sprangular/sprangular/releases{/id}","created_at":"2014-08-13T18:43:03Z","updated_at":"2015-05-07T14:57:28Z","pushed_at":"2015-05-07T18:12:13Z","git_url":"git://github.com/sprangular/sprangular.git","ssh_url":"git@github.com:sprangular/sprangular.git","clone_url":"https://github.com/sprangular/sprangular.git","svn_url":"https://github.com/sprangular/sprangular","homepage":null,"size":7973,"stargazers_count":46,"watchers_count":46,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":16,"forks":12,"open_issues":16,"watchers":46,"default_branch":"master"}},"base":{"label":"sprangular:master","ref":"master","sha":"1c2eb5652a632a97f65e74595572fd958c65f01c","user":{"login":"sprangular","id":10926453,"avatar_url":"https://avatars.githubusercontent.com/u/10926453?v=3","gravatar_id":"","url":"https://api.github.com/users/sprangular","html_url":"https://github.com/sprangular","followers_url":"https://api.github.com/users/sprangular/followers","following_url":"https://api.github.com/users/sprangular/following{/other_user}","gists_url":"https://api.github.com/users/sprangular/gists{/gist_id}","starred_url":"https://api.github.com/users/sprangular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprangular/subscriptions","organizations_url":"https://api.github.com/users/sprangular/orgs","repos_url":"https://api.github.com/users/sprangular/repos","events_url":"https://api.github.com/users/sprangular/events{/privacy}","received_events_url":"https://api.github.com/users/sprangular/received_events","type":"Organization","site_admin":false},"repo":{"id":22926972,"name":"sprangular","full_name":"sprangular/sprangular","owner":{"login":"sprangular","id":10926453,"avatar_url":"https://avatars.githubusercontent.com/u/10926453?v=3","gravatar_id":"","url":"https://api.github.com/users/sprangular","html_url":"https://github.com/sprangular","followers_url":"https://api.github.com/users/sprangular/followers","following_url":"https://api.github.com/users/sprangular/following{/other_user}","gists_url":"https://api.github.com/users/sprangular/gists{/gist_id}","starred_url":"https://api.github.com/users/sprangular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprangular/subscriptions","organizations_url":"https://api.github.com/users/sprangular/orgs","repos_url":"https://api.github.com/users/sprangular/repos","events_url":"https://api.github.com/users/sprangular/events{/privacy}","received_events_url":"https://api.github.com/users/sprangular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sprangular/sprangular","description":"Spree + Angular.js frontend","fork":false,"url":"https://api.github.com/repos/sprangular/sprangular","forks_url":"https://api.github.com/repos/sprangular/sprangular/forks","keys_url":"https://api.github.com/repos/sprangular/sprangular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sprangular/sprangular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sprangular/sprangular/teams","hooks_url":"https://api.github.com/repos/sprangular/sprangular/hooks","issue_events_url":"https://api.github.com/repos/sprangular/sprangular/issues/events{/number}","events_url":"https://api.github.com/repos/sprangular/sprangular/events","assignees_url":"https://api.github.com/repos/sprangular/sprangular/assignees{/user}","branches_url":"https://api.github.com/repos/sprangular/sprangular/branches{/branch}","tags_url":"https://api.github.com/repos/sprangular/sprangular/tags","blobs_url":"https://api.github.com/repos/sprangular/sprangular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sprangular/sprangular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sprangular/sprangular/git/refs{/sha}","trees_url":"https://api.github.com/repos/sprangular/sprangular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sprangular/sprangular/statuses/{sha}","languages_url":"https://api.github.com/repos/sprangular/sprangular/languages","stargazers_url":"https://api.github.com/repos/sprangular/sprangular/stargazers","contributors_url":"https://api.github.com/repos/sprangular/sprangular/contributors","subscribers_url":"https://api.github.com/repos/sprangular/sprangular/subscribers","subscription_url":"https://api.github.com/repos/sprangular/sprangular/subscription","commits_url":"https://api.github.com/repos/sprangular/sprangular/commits{/sha}","git_commits_url":"https://api.github.com/repos/sprangular/sprangular/git/commits{/sha}","comments_url":"https://api.github.com/repos/sprangular/sprangular/comments{/number}","issue_comment_url":"https://api.github.com/repos/sprangular/sprangular/issues/comments{/number}","contents_url":"https://api.github.com/repos/sprangular/sprangular/contents/{+path}","compare_url":"https://api.github.com/repos/sprangular/sprangular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sprangular/sprangular/merges","archive_url":"https://api.github.com/repos/sprangular/sprangular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sprangular/sprangular/downloads","issues_url":"https://api.github.com/repos/sprangular/sprangular/issues{/number}","pulls_url":"https://api.github.com/repos/sprangular/sprangular/pulls{/number}","milestones_url":"https://api.github.com/repos/sprangular/sprangular/milestones{/number}","notifications_url":"https://api.github.com/repos/sprangular/sprangular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sprangular/sprangular/labels{/name}","releases_url":"https://api.github.com/repos/sprangular/sprangular/releases{/id}","created_at":"2014-08-13T18:43:03Z","updated_at":"2015-05-07T14:57:28Z","pushed_at":"2015-05-07T18:12:13Z","git_url":"git://github.com/sprangular/sprangular.git","ssh_url":"git@github.com:sprangular/sprangular.git","clone_url":"https://github.com/sprangular/sprangular.git","svn_url":"https://github.com/sprangular/sprangular","homepage":null,"size":7973,"stargazers_count":46,"watchers_count":46,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":16,"forks":12,"open_issues":16,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sprangular/sprangular/pulls/157"},"html":{"href":"https://github.com/sprangular/sprangular/pull/157"},"issue":{"href":"https://api.github.com/repos/sprangular/sprangular/issues/157"},"comments":{"href":"https://api.github.com/repos/sprangular/sprangular/issues/157/comments"},"review_comments":{"href":"https://api.github.com/repos/sprangular/sprangular/pulls/157/comments"},"review_comment":{"href":"https://api.github.com/repos/sprangular/sprangular/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sprangular/sprangular/pulls/157/commits"},"statuses":{"href":"https://api.github.com/repos/sprangular/sprangular/statuses/a6c7a2c1ab08957c9b6982e2666efc51ee1574dd"}}}}