{"action":"created","issue":{"url":"https://api.github.com/repos/solidusio/solidus/issues/343","labels_url":"https://api.github.com/repos/solidusio/solidus/issues/343/labels{/name}","comments_url":"https://api.github.com/repos/solidusio/solidus/issues/343/comments","events_url":"https://api.github.com/repos/solidusio/solidus/issues/343/events","html_url":"https://github.com/solidusio/solidus/pull/343","id":104058891,"number":343,"title":"Configurable variant search class","user":{"login":"jordan-brough","id":23050,"avatar_url":"https://avatars.githubusercontent.com/u/23050?v=3","gravatar_id":"","url":"https://api.github.com/users/jordan-brough","html_url":"https://github.com/jordan-brough","followers_url":"https://api.github.com/users/jordan-brough/followers","following_url":"https://api.github.com/users/jordan-brough/following{/other_user}","gists_url":"https://api.github.com/users/jordan-brough/gists{/gist_id}","starred_url":"https://api.github.com/users/jordan-brough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordan-brough/subscriptions","organizations_url":"https://api.github.com/users/jordan-brough/orgs","repos_url":"https://api.github.com/users/jordan-brough/repos","events_url":"https://api.github.com/users/jordan-brough/events{/privacy}","received_events_url":"https://api.github.com/users/jordan-brough/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-08-31T14:00:09Z","updated_at":"2015-09-01T20:39:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/solidusio/solidus/pulls/343","html_url":"https://github.com/solidusio/solidus/pull/343","diff_url":"https://github.com/solidusio/solidus/pull/343.diff","patch_url":"https://github.com/solidusio/solidus/pull/343.patch"},"body":"Just like base search class.\r\n\r\nWe need to work around what I consider a Ransack bug and this was the best way I could think of to allow us to do that cleanly, since it seems like a reasonable thing to do anyway and is nice and specific.\r\n\r\nThe 'Ransack bug' is that if you add numeric fields to the list of `search_terms` (we add some numeric fields in our app) and then a user supplies a search term that is a really big number (most likely intented to match one of the *string* fields) then the searcher will blow up.\r\n\r\ne.g. this is fine:\r\n```ruby\r\n>> Spree::Order.where(id: 'a999999999999999999999999999').first\r\n=> nil\r\n```\r\nbut this blows up:\r\n```ruby\r\n>> Spree::Order.where(id: '999999999999999999999999999').first\r\nRangeError: 999999999999999999999999999 is out of range for ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Integer with limit 4\r\n```"},"comment":{"url":"https://api.github.com/repos/solidusio/solidus/issues/comments/136854653","html_url":"https://github.com/solidusio/solidus/pull/343#issuecomment-136854653","issue_url":"https://api.github.com/repos/solidusio/solidus/issues/343","id":136854653,"user":{"login":"jordan-brough","id":23050,"avatar_url":"https://avatars.githubusercontent.com/u/23050?v=3","gravatar_id":"","url":"https://api.github.com/users/jordan-brough","html_url":"https://github.com/jordan-brough","followers_url":"https://api.github.com/users/jordan-brough/followers","following_url":"https://api.github.com/users/jordan-brough/following{/other_user}","gists_url":"https://api.github.com/users/jordan-brough/gists{/gist_id}","starred_url":"https://api.github.com/users/jordan-brough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordan-brough/subscriptions","organizations_url":"https://api.github.com/users/jordan-brough/orgs","repos_url":"https://api.github.com/users/jordan-brough/repos","events_url":"https://api.github.com/users/jordan-brough/events{/privacy}","received_events_url":"https://api.github.com/users/jordan-brough/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T20:39:34Z","updated_at":"2015-09-01T20:39:34Z","body":"I added the `# @api public` tag and will merge as per the comments and core team meeting"}}