{"action":"opened","number":337,"pull_request":{"url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/pulls/337","id":57930445,"html_url":"https://github.com/composite-primary-keys/composite_primary_keys/pull/337","diff_url":"https://github.com/composite-primary-keys/composite_primary_keys/pull/337.diff","patch_url":"https://github.com/composite-primary-keys/composite_primary_keys/pull/337.patch","issue_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/issues/337","number":337,"state":"open","locked":false,"title":"NoMethodError: undefined method `name' for ... Arel::Nodes::SqlLiteral","user":{"login":"tye","id":7884,"avatar_url":"https://avatars.githubusercontent.com/u/7884?v=3","gravatar_id":"","url":"https://api.github.com/users/tye","html_url":"https://github.com/tye","followers_url":"https://api.github.com/users/tye/followers","following_url":"https://api.github.com/users/tye/following{/other_user}","gists_url":"https://api.github.com/users/tye/gists{/gist_id}","starred_url":"https://api.github.com/users/tye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tye/subscriptions","organizations_url":"https://api.github.com/users/tye/orgs","repos_url":"https://api.github.com/users/tye/repos","events_url":"https://api.github.com/users/tye/events{/privacy}","received_events_url":"https://api.github.com/users/tye/received_events","type":"User","site_admin":false},"body":"When using composite_primary_keys, Arel::Nodes::In#to_sql throws an exceptions when the left side is a Arel::Nodes::SqlLiteral.\r\n\r\nPlease see this for a reproducible example:\r\nhttps://gist.github.com/tye/948de93617e5fa1752a7\r\n\r\nI am experiencing this problem in certain scenarios using Ransack.\r\n\r\nIn the reproducible example, you can uncomment my branch and comment out the composite-primary-keys branch to see it passes with the patch I am proposing.\r\n","created_at":"2016-02-02T02:02:25Z","updated_at":"2016-02-02T02:02:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/pulls/337/commits","review_comments_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/pulls/337/comments","review_comment_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/pulls/comments{/number}","comments_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/issues/337/comments","statuses_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/statuses/5a9f9280d78584d2e54629e9b04b5638b130851b","head":{"label":"tye:ar_4.2.x","ref":"ar_4.2.x","sha":"5a9f9280d78584d2e54629e9b04b5638b130851b","user":{"login":"tye","id":7884,"avatar_url":"https://avatars.githubusercontent.com/u/7884?v=3","gravatar_id":"","url":"https://api.github.com/users/tye","html_url":"https://github.com/tye","followers_url":"https://api.github.com/users/tye/followers","following_url":"https://api.github.com/users/tye/following{/other_user}","gists_url":"https://api.github.com/users/tye/gists{/gist_id}","starred_url":"https://api.github.com/users/tye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tye/subscriptions","organizations_url":"https://api.github.com/users/tye/orgs","repos_url":"https://api.github.com/users/tye/repos","events_url":"https://api.github.com/users/tye/events{/privacy}","received_events_url":"https://api.github.com/users/tye/received_events","type":"User","site_admin":false},"repo":{"id":50886053,"name":"composite_primary_keys","full_name":"tye/composite_primary_keys","owner":{"login":"tye","id":7884,"avatar_url":"https://avatars.githubusercontent.com/u/7884?v=3","gravatar_id":"","url":"https://api.github.com/users/tye","html_url":"https://github.com/tye","followers_url":"https://api.github.com/users/tye/followers","following_url":"https://api.github.com/users/tye/following{/other_user}","gists_url":"https://api.github.com/users/tye/gists{/gist_id}","starred_url":"https://api.github.com/users/tye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tye/subscriptions","organizations_url":"https://api.github.com/users/tye/orgs","repos_url":"https://api.github.com/users/tye/repos","events_url":"https://api.github.com/users/tye/events{/privacy}","received_events_url":"https://api.github.com/users/tye/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tye/composite_primary_keys","description":"Composite Primary Keys support for Active Record","fork":true,"url":"https://api.github.com/repos/tye/composite_primary_keys","forks_url":"https://api.github.com/repos/tye/composite_primary_keys/forks","keys_url":"https://api.github.com/repos/tye/composite_primary_keys/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tye/composite_primary_keys/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tye/composite_primary_keys/teams","hooks_url":"https://api.github.com/repos/tye/composite_primary_keys/hooks","issue_events_url":"https://api.github.com/repos/tye/composite_primary_keys/issues/events{/number}","events_url":"https://api.github.com/repos/tye/composite_primary_keys/events","assignees_url":"https://api.github.com/repos/tye/composite_primary_keys/assignees{/user}","branches_url":"https://api.github.com/repos/tye/composite_primary_keys/branches{/branch}","tags_url":"https://api.github.com/repos/tye/composite_primary_keys/tags","blobs_url":"https://api.github.com/repos/tye/composite_primary_keys/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tye/composite_primary_keys/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tye/composite_primary_keys/git/refs{/sha}","trees_url":"https://api.github.com/repos/tye/composite_primary_keys/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tye/composite_primary_keys/statuses/{sha}","languages_url":"https://api.github.com/repos/tye/composite_primary_keys/languages","stargazers_url":"https://api.github.com/repos/tye/composite_primary_keys/stargazers","contributors_url":"https://api.github.com/repos/tye/composite_primary_keys/contributors","subscribers_url":"https://api.github.com/repos/tye/composite_primary_keys/subscribers","subscription_url":"https://api.github.com/repos/tye/composite_primary_keys/subscription","commits_url":"https://api.github.com/repos/tye/composite_primary_keys/commits{/sha}","git_commits_url":"https://api.github.com/repos/tye/composite_primary_keys/git/commits{/sha}","comments_url":"https://api.github.com/repos/tye/composite_primary_keys/comments{/number}","issue_comment_url":"https://api.github.com/repos/tye/composite_primary_keys/issues/comments{/number}","contents_url":"https://api.github.com/repos/tye/composite_primary_keys/contents/{+path}","compare_url":"https://api.github.com/repos/tye/composite_primary_keys/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tye/composite_primary_keys/merges","archive_url":"https://api.github.com/repos/tye/composite_primary_keys/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tye/composite_primary_keys/downloads","issues_url":"https://api.github.com/repos/tye/composite_primary_keys/issues{/number}","pulls_url":"https://api.github.com/repos/tye/composite_primary_keys/pulls{/number}","milestones_url":"https://api.github.com/repos/tye/composite_primary_keys/milestones{/number}","notifications_url":"https://api.github.com/repos/tye/composite_primary_keys/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tye/composite_primary_keys/labels{/name}","releases_url":"https://api.github.com/repos/tye/composite_primary_keys/releases{/id}","deployments_url":"https://api.github.com/repos/tye/composite_primary_keys/deployments","created_at":"2016-02-02T01:49:55Z","updated_at":"2016-02-02T01:49:55Z","pushed_at":"2016-02-02T01:52:05Z","git_url":"git://github.com/tye/composite_primary_keys.git","ssh_url":"git@github.com:tye/composite_primary_keys.git","clone_url":"https://github.com/tye/composite_primary_keys.git","svn_url":"https://github.com/tye/composite_primary_keys","homepage":"","size":1905,"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":"composite-primary-keys:ar_4.2.x","ref":"ar_4.2.x","sha":"0db18264ad8584f2cdb25949ec57b05014c42897","user":{"login":"composite-primary-keys","id":5168316,"avatar_url":"https://avatars.githubusercontent.com/u/5168316?v=3","gravatar_id":"","url":"https://api.github.com/users/composite-primary-keys","html_url":"https://github.com/composite-primary-keys","followers_url":"https://api.github.com/users/composite-primary-keys/followers","following_url":"https://api.github.com/users/composite-primary-keys/following{/other_user}","gists_url":"https://api.github.com/users/composite-primary-keys/gists{/gist_id}","starred_url":"https://api.github.com/users/composite-primary-keys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/composite-primary-keys/subscriptions","organizations_url":"https://api.github.com/users/composite-primary-keys/orgs","repos_url":"https://api.github.com/users/composite-primary-keys/repos","events_url":"https://api.github.com/users/composite-primary-keys/events{/privacy}","received_events_url":"https://api.github.com/users/composite-primary-keys/received_events","type":"Organization","site_admin":false},"repo":{"id":2548,"name":"composite_primary_keys","full_name":"composite-primary-keys/composite_primary_keys","owner":{"login":"composite-primary-keys","id":5168316,"avatar_url":"https://avatars.githubusercontent.com/u/5168316?v=3","gravatar_id":"","url":"https://api.github.com/users/composite-primary-keys","html_url":"https://github.com/composite-primary-keys","followers_url":"https://api.github.com/users/composite-primary-keys/followers","following_url":"https://api.github.com/users/composite-primary-keys/following{/other_user}","gists_url":"https://api.github.com/users/composite-primary-keys/gists{/gist_id}","starred_url":"https://api.github.com/users/composite-primary-keys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/composite-primary-keys/subscriptions","organizations_url":"https://api.github.com/users/composite-primary-keys/orgs","repos_url":"https://api.github.com/users/composite-primary-keys/repos","events_url":"https://api.github.com/users/composite-primary-keys/events{/privacy}","received_events_url":"https://api.github.com/users/composite-primary-keys/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/composite-primary-keys/composite_primary_keys","description":"Composite Primary Keys support for Active Record","fork":false,"url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys","forks_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/forks","keys_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/keys{/key_id}","collaborators_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/teams","hooks_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/hooks","issue_events_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/issues/events{/number}","events_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/events","assignees_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/assignees{/user}","branches_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/branches{/branch}","tags_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/tags","blobs_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/git/refs{/sha}","trees_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/git/trees{/sha}","statuses_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/statuses/{sha}","languages_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/languages","stargazers_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/stargazers","contributors_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/contributors","subscribers_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/subscribers","subscription_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/subscription","commits_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/commits{/sha}","git_commits_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/git/commits{/sha}","comments_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/comments{/number}","issue_comment_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/issues/comments{/number}","contents_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/contents/{+path}","compare_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/compare/{base}...{head}","merges_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/merges","archive_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/downloads","issues_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/issues{/number}","pulls_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/pulls{/number}","milestones_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/milestones{/number}","notifications_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/labels{/name}","releases_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/releases{/id}","deployments_url":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/deployments","created_at":"2008-03-04T22:58:40Z","updated_at":"2016-02-01T20:37:28Z","pushed_at":"2015-12-14T03:48:39Z","git_url":"git://github.com/composite-primary-keys/composite_primary_keys.git","ssh_url":"git@github.com:composite-primary-keys/composite_primary_keys.git","clone_url":"https://github.com/composite-primary-keys/composite_primary_keys.git","svn_url":"https://github.com/composite-primary-keys/composite_primary_keys","homepage":"","size":2282,"stargazers_count":493,"watchers_count":493,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":203,"mirror_url":null,"open_issues_count":24,"forks":203,"open_issues":24,"watchers":493,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/pulls/337"},"html":{"href":"https://github.com/composite-primary-keys/composite_primary_keys/pull/337"},"issue":{"href":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/issues/337"},"comments":{"href":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/issues/337/comments"},"review_comments":{"href":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/pulls/337/comments"},"review_comment":{"href":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/pulls/337/commits"},"statuses":{"href":"https://api.github.com/repos/composite-primary-keys/composite_primary_keys/statuses/5a9f9280d78584d2e54629e9b04b5638b130851b"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}