{"action":"closed","number":174,"pull_request":{"url":"https://api.github.com/repos/swanandp/acts_as_list/pulls/174","id":48229401,"html_url":"https://github.com/swanandp/acts_as_list/pull/174","diff_url":"https://github.com/swanandp/acts_as_list/pull/174.diff","patch_url":"https://github.com/swanandp/acts_as_list/pull/174.patch","issue_url":"https://api.github.com/repos/swanandp/acts_as_list/issues/174","number":174,"state":"closed","locked":false,"title":"Escapes table name to fix Mysql2 errors","user":{"login":"ychaker","id":29512,"avatar_url":"https://avatars.githubusercontent.com/u/29512?v=3","gravatar_id":"","url":"https://api.github.com/users/ychaker","html_url":"https://github.com/ychaker","followers_url":"https://api.github.com/users/ychaker/followers","following_url":"https://api.github.com/users/ychaker/following{/other_user}","gists_url":"https://api.github.com/users/ychaker/gists{/gist_id}","starred_url":"https://api.github.com/users/ychaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ychaker/subscriptions","organizations_url":"https://api.github.com/users/ychaker/orgs","repos_url":"https://api.github.com/users/ychaker/repos","events_url":"https://api.github.com/users/ychaker/events{/privacy}","received_events_url":"https://api.github.com/users/ychaker/received_events","type":"User","site_admin":false},"body":"I'm working on a project where I have inherited weird table names (porting the app from another language/framework to Ruby on Rails).\r\nCurrently some tables are named like so `table-name` which cause the following error:\r\n\r\n`Mysql2::Error: Unknown column 'table' in 'where clause': SELECT  `table-name`.* FROM `table-name` WHERE (table-name.position IS NOT NULL) AND `table-name`.`snapshot_query_id` = 1  ORDER BY table-name.position DESC LIMIT 1`\r\n\r\nEscaping the table name with \\` \\` helps avoid this problem.","created_at":"2015-10-20T17:04:51Z","updated_at":"2016-04-18T14:13:11Z","closed_at":"2016-04-18T14:13:11Z","merged_at":null,"merge_commit_sha":"3d87181287e26a38f345d2846604fbf1f7771e9d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/swanandp/acts_as_list/pulls/174/commits","review_comments_url":"https://api.github.com/repos/swanandp/acts_as_list/pulls/174/comments","review_comment_url":"https://api.github.com/repos/swanandp/acts_as_list/pulls/comments{/number}","comments_url":"https://api.github.com/repos/swanandp/acts_as_list/issues/174/comments","statuses_url":"https://api.github.com/repos/swanandp/acts_as_list/statuses/eda2dbd064e7500ba0075fa79004a49c53c4e490","head":{"label":"ychaker:master","ref":"master","sha":"eda2dbd064e7500ba0075fa79004a49c53c4e490","user":{"login":"ychaker","id":29512,"avatar_url":"https://avatars.githubusercontent.com/u/29512?v=3","gravatar_id":"","url":"https://api.github.com/users/ychaker","html_url":"https://github.com/ychaker","followers_url":"https://api.github.com/users/ychaker/followers","following_url":"https://api.github.com/users/ychaker/following{/other_user}","gists_url":"https://api.github.com/users/ychaker/gists{/gist_id}","starred_url":"https://api.github.com/users/ychaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ychaker/subscriptions","organizations_url":"https://api.github.com/users/ychaker/orgs","repos_url":"https://api.github.com/users/ychaker/repos","events_url":"https://api.github.com/users/ychaker/events{/privacy}","received_events_url":"https://api.github.com/users/ychaker/received_events","type":"User","site_admin":false},"repo":{"id":44621262,"name":"acts_as_list","full_name":"ychaker/acts_as_list","owner":{"login":"ychaker","id":29512,"avatar_url":"https://avatars.githubusercontent.com/u/29512?v=3","gravatar_id":"","url":"https://api.github.com/users/ychaker","html_url":"https://github.com/ychaker","followers_url":"https://api.github.com/users/ychaker/followers","following_url":"https://api.github.com/users/ychaker/following{/other_user}","gists_url":"https://api.github.com/users/ychaker/gists{/gist_id}","starred_url":"https://api.github.com/users/ychaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ychaker/subscriptions","organizations_url":"https://api.github.com/users/ychaker/orgs","repos_url":"https://api.github.com/users/ychaker/repos","events_url":"https://api.github.com/users/ychaker/events{/privacy}","received_events_url":"https://api.github.com/users/ychaker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ychaker/acts_as_list","description":"An ActiveRecord plugin for managing lists.","fork":true,"url":"https://api.github.com/repos/ychaker/acts_as_list","forks_url":"https://api.github.com/repos/ychaker/acts_as_list/forks","keys_url":"https://api.github.com/repos/ychaker/acts_as_list/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ychaker/acts_as_list/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ychaker/acts_as_list/teams","hooks_url":"https://api.github.com/repos/ychaker/acts_as_list/hooks","issue_events_url":"https://api.github.com/repos/ychaker/acts_as_list/issues/events{/number}","events_url":"https://api.github.com/repos/ychaker/acts_as_list/events","assignees_url":"https://api.github.com/repos/ychaker/acts_as_list/assignees{/user}","branches_url":"https://api.github.com/repos/ychaker/acts_as_list/branches{/branch}","tags_url":"https://api.github.com/repos/ychaker/acts_as_list/tags","blobs_url":"https://api.github.com/repos/ychaker/acts_as_list/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ychaker/acts_as_list/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ychaker/acts_as_list/git/refs{/sha}","trees_url":"https://api.github.com/repos/ychaker/acts_as_list/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ychaker/acts_as_list/statuses/{sha}","languages_url":"https://api.github.com/repos/ychaker/acts_as_list/languages","stargazers_url":"https://api.github.com/repos/ychaker/acts_as_list/stargazers","contributors_url":"https://api.github.com/repos/ychaker/acts_as_list/contributors","subscribers_url":"https://api.github.com/repos/ychaker/acts_as_list/subscribers","subscription_url":"https://api.github.com/repos/ychaker/acts_as_list/subscription","commits_url":"https://api.github.com/repos/ychaker/acts_as_list/commits{/sha}","git_commits_url":"https://api.github.com/repos/ychaker/acts_as_list/git/commits{/sha}","comments_url":"https://api.github.com/repos/ychaker/acts_as_list/comments{/number}","issue_comment_url":"https://api.github.com/repos/ychaker/acts_as_list/issues/comments{/number}","contents_url":"https://api.github.com/repos/ychaker/acts_as_list/contents/{+path}","compare_url":"https://api.github.com/repos/ychaker/acts_as_list/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ychaker/acts_as_list/merges","archive_url":"https://api.github.com/repos/ychaker/acts_as_list/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ychaker/acts_as_list/downloads","issues_url":"https://api.github.com/repos/ychaker/acts_as_list/issues{/number}","pulls_url":"https://api.github.com/repos/ychaker/acts_as_list/pulls{/number}","milestones_url":"https://api.github.com/repos/ychaker/acts_as_list/milestones{/number}","notifications_url":"https://api.github.com/repos/ychaker/acts_as_list/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ychaker/acts_as_list/labels{/name}","releases_url":"https://api.github.com/repos/ychaker/acts_as_list/releases{/id}","deployments_url":"https://api.github.com/repos/ychaker/acts_as_list/deployments","created_at":"2015-10-20T16:57:25Z","updated_at":"2016-04-18T13:24:26Z","pushed_at":"2016-04-18T13:24:25Z","git_url":"git://github.com/ychaker/acts_as_list.git","ssh_url":"git@github.com:ychaker/acts_as_list.git","clone_url":"https://github.com/ychaker/acts_as_list.git","svn_url":"https://github.com/ychaker/acts_as_list","homepage":"http://swanandp.github.io/acts_as_list/","size":310,"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":"swanandp:master","ref":"master","sha":"a4d02e3357f427a6f23695bcf4f8a291377042af","user":{"login":"swanandp","id":90904,"avatar_url":"https://avatars.githubusercontent.com/u/90904?v=3","gravatar_id":"","url":"https://api.github.com/users/swanandp","html_url":"https://github.com/swanandp","followers_url":"https://api.github.com/users/swanandp/followers","following_url":"https://api.github.com/users/swanandp/following{/other_user}","gists_url":"https://api.github.com/users/swanandp/gists{/gist_id}","starred_url":"https://api.github.com/users/swanandp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swanandp/subscriptions","organizations_url":"https://api.github.com/users/swanandp/orgs","repos_url":"https://api.github.com/users/swanandp/repos","events_url":"https://api.github.com/users/swanandp/events{/privacy}","received_events_url":"https://api.github.com/users/swanandp/received_events","type":"User","site_admin":false},"repo":{"id":1330786,"name":"acts_as_list","full_name":"swanandp/acts_as_list","owner":{"login":"swanandp","id":90904,"avatar_url":"https://avatars.githubusercontent.com/u/90904?v=3","gravatar_id":"","url":"https://api.github.com/users/swanandp","html_url":"https://github.com/swanandp","followers_url":"https://api.github.com/users/swanandp/followers","following_url":"https://api.github.com/users/swanandp/following{/other_user}","gists_url":"https://api.github.com/users/swanandp/gists{/gist_id}","starred_url":"https://api.github.com/users/swanandp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swanandp/subscriptions","organizations_url":"https://api.github.com/users/swanandp/orgs","repos_url":"https://api.github.com/users/swanandp/repos","events_url":"https://api.github.com/users/swanandp/events{/privacy}","received_events_url":"https://api.github.com/users/swanandp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/swanandp/acts_as_list","description":"An ActiveRecord plugin for managing lists.","fork":true,"url":"https://api.github.com/repos/swanandp/acts_as_list","forks_url":"https://api.github.com/repos/swanandp/acts_as_list/forks","keys_url":"https://api.github.com/repos/swanandp/acts_as_list/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swanandp/acts_as_list/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swanandp/acts_as_list/teams","hooks_url":"https://api.github.com/repos/swanandp/acts_as_list/hooks","issue_events_url":"https://api.github.com/repos/swanandp/acts_as_list/issues/events{/number}","events_url":"https://api.github.com/repos/swanandp/acts_as_list/events","assignees_url":"https://api.github.com/repos/swanandp/acts_as_list/assignees{/user}","branches_url":"https://api.github.com/repos/swanandp/acts_as_list/branches{/branch}","tags_url":"https://api.github.com/repos/swanandp/acts_as_list/tags","blobs_url":"https://api.github.com/repos/swanandp/acts_as_list/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swanandp/acts_as_list/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swanandp/acts_as_list/git/refs{/sha}","trees_url":"https://api.github.com/repos/swanandp/acts_as_list/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swanandp/acts_as_list/statuses/{sha}","languages_url":"https://api.github.com/repos/swanandp/acts_as_list/languages","stargazers_url":"https://api.github.com/repos/swanandp/acts_as_list/stargazers","contributors_url":"https://api.github.com/repos/swanandp/acts_as_list/contributors","subscribers_url":"https://api.github.com/repos/swanandp/acts_as_list/subscribers","subscription_url":"https://api.github.com/repos/swanandp/acts_as_list/subscription","commits_url":"https://api.github.com/repos/swanandp/acts_as_list/commits{/sha}","git_commits_url":"https://api.github.com/repos/swanandp/acts_as_list/git/commits{/sha}","comments_url":"https://api.github.com/repos/swanandp/acts_as_list/comments{/number}","issue_comment_url":"https://api.github.com/repos/swanandp/acts_as_list/issues/comments{/number}","contents_url":"https://api.github.com/repos/swanandp/acts_as_list/contents/{+path}","compare_url":"https://api.github.com/repos/swanandp/acts_as_list/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swanandp/acts_as_list/merges","archive_url":"https://api.github.com/repos/swanandp/acts_as_list/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swanandp/acts_as_list/downloads","issues_url":"https://api.github.com/repos/swanandp/acts_as_list/issues{/number}","pulls_url":"https://api.github.com/repos/swanandp/acts_as_list/pulls{/number}","milestones_url":"https://api.github.com/repos/swanandp/acts_as_list/milestones{/number}","notifications_url":"https://api.github.com/repos/swanandp/acts_as_list/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swanandp/acts_as_list/labels{/name}","releases_url":"https://api.github.com/repos/swanandp/acts_as_list/releases{/id}","deployments_url":"https://api.github.com/repos/swanandp/acts_as_list/deployments","created_at":"2011-02-05T06:39:01Z","updated_at":"2016-04-17T04:08:24Z","pushed_at":"2016-04-18T14:10:46Z","git_url":"git://github.com/swanandp/acts_as_list.git","ssh_url":"git@github.com:swanandp/acts_as_list.git","clone_url":"https://github.com/swanandp/acts_as_list.git","svn_url":"https://github.com/swanandp/acts_as_list","homepage":"http://swanandp.github.io/acts_as_list/","size":475,"stargazers_count":945,"watchers_count":945,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":219,"mirror_url":null,"open_issues_count":27,"forks":219,"open_issues":27,"watchers":945,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/swanandp/acts_as_list/pulls/174"},"html":{"href":"https://github.com/swanandp/acts_as_list/pull/174"},"issue":{"href":"https://api.github.com/repos/swanandp/acts_as_list/issues/174"},"comments":{"href":"https://api.github.com/repos/swanandp/acts_as_list/issues/174/comments"},"review_comments":{"href":"https://api.github.com/repos/swanandp/acts_as_list/pulls/174/comments"},"review_comment":{"href":"https://api.github.com/repos/swanandp/acts_as_list/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/swanandp/acts_as_list/pulls/174/commits"},"statuses":{"href":"https://api.github.com/repos/swanandp/acts_as_list/statuses/eda2dbd064e7500ba0075fa79004a49c53c4e490"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":4,"review_comments":1,"commits":2,"additions":10,"deletions":7,"changed_files":1}}