{"action":"created","comment":{"url":"https://api.github.com/repos/CanCanCommunity/cancancan/pulls/comments/58280659","id":58280659,"diff_hunk":"@@ -12,7 +12,7 @@ module ClassMethods\n       #   end\n       #\n       def load_and_authorize_resource(*args)\n-        cancan_resource_class.add_before_filter(self, :load_and_authorize_resource, *args)\n+        cancan_resource_class.add_before_action(self, :load_and_authorize_resource, *args)","path":"lib/cancan/controller_additions.rb","position":5,"original_position":5,"commit_id":"9090f1a5104e147970ba6347947f1cb675c6b832","original_commit_id":"9090f1a5104e147970ba6347947f1cb675c6b832","user":{"login":"craig1410","id":1668530,"avatar_url":"https://avatars.githubusercontent.com/u/1668530?v=3","gravatar_id":"","url":"https://api.github.com/users/craig1410","html_url":"https://github.com/craig1410","followers_url":"https://api.github.com/users/craig1410/followers","following_url":"https://api.github.com/users/craig1410/following{/other_user}","gists_url":"https://api.github.com/users/craig1410/gists{/gist_id}","starred_url":"https://api.github.com/users/craig1410/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craig1410/subscriptions","organizations_url":"https://api.github.com/users/craig1410/orgs","repos_url":"https://api.github.com/users/craig1410/repos","events_url":"https://api.github.com/users/craig1410/events{/privacy}","received_events_url":"https://api.github.com/users/craig1410/received_events","type":"User","site_admin":false},"body":"Apologies for delay in responding @Senjai , I thought I had already done so. Yeah good spot there and yes it is worrying that it passes tests. Do you have any suggestions on how I might use *_filter in Rails 3.2 and *_action in Rails 4+. Is it just case of having loads of conditionals throughout the code or is there a better way? I don't mind doing the work.","created_at":"2016-04-01T23:23:20Z","updated_at":"2016-04-01T23:23:20Z","html_url":"https://github.com/CanCanCommunity/cancancan/pull/289#discussion_r58280659","pull_request_url":"https://api.github.com/repos/CanCanCommunity/cancancan/pulls/289","_links":{"self":{"href":"https://api.github.com/repos/CanCanCommunity/cancancan/pulls/comments/58280659"},"html":{"href":"https://github.com/CanCanCommunity/cancancan/pull/289#discussion_r58280659"},"pull_request":{"href":"https://api.github.com/repos/CanCanCommunity/cancancan/pulls/289"}}},"pull_request":{"url":"https://api.github.com/repos/CanCanCommunity/cancancan/pulls/289","id":56403546,"html_url":"https://github.com/CanCanCommunity/cancancan/pull/289","diff_url":"https://github.com/CanCanCommunity/cancancan/pull/289.diff","patch_url":"https://github.com/CanCanCommunity/cancancan/pull/289.patch","issue_url":"https://api.github.com/repos/CanCanCommunity/cancancan/issues/289","number":289,"state":"open","locked":false,"title":"Rails 5 Tests and Fixes","user":{"login":"craig1410","id":1668530,"avatar_url":"https://avatars.githubusercontent.com/u/1668530?v=3","gravatar_id":"","url":"https://api.github.com/users/craig1410","html_url":"https://github.com/craig1410","followers_url":"https://api.github.com/users/craig1410/followers","following_url":"https://api.github.com/users/craig1410/following{/other_user}","gists_url":"https://api.github.com/users/craig1410/gists{/gist_id}","starred_url":"https://api.github.com/users/craig1410/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craig1410/subscriptions","organizations_url":"https://api.github.com/users/craig1410/orgs","repos_url":"https://api.github.com/users/craig1410/repos","events_url":"https://api.github.com/users/craig1410/events{/privacy}","received_events_url":"https://api.github.com/users/craig1410/received_events","type":"User","site_admin":false},"body":"Sharing the work completed so far on getting cancancan working under Rails 5 and Ruby 2.2.x. \r\n\r\nCurrently 9 test failures - starting to work on fixing them. Collaboration welcome.\r\n```\r\nrspec ./spec/cancan/model_adapters/active_record_adapter_spec.rb:162 # CanCan::ModelAdapters::ActiveRecordAdapter should only read articles which are published or in visible categories\r\nrspec ./spec/cancan/model_adapters/active_record_adapter_spec.rb:267 # CanCan::ModelAdapters::ActiveRecordAdapter returns `not (sql)` for single `cannot` definition in front of default `can` condition\r\nrspec ./spec/cancan/model_adapters/active_record_adapter_spec.rb:187 # CanCan::ModelAdapters::ActiveRecordAdapter allows conditions in SQL and merge with hash conditions\r\nrspec ./spec/cancan/model_adapters/active_record_adapter_spec.rb:293 # CanCan::ModelAdapters::ActiveRecordAdapter does not forget conditions when calling with SQL string\r\nrspec ./spec/cancan/model_adapters/active_record_adapter_spec.rb:125 # CanCan::ModelAdapters::ActiveRecordAdapter fetches any articles which are published or secret\r\nrspec ./spec/cancan/model_adapters/active_record_adapter_spec.rb:145 # CanCan::ModelAdapters::ActiveRecordAdapter fetches only the articles that are published and not secret\r\nrspec ./spec/cancan/model_adapters/active_record_adapter_spec.rb:135 # CanCan::ModelAdapters::ActiveRecordAdapter fetches any articles which we are cited in\r\nrspec ./spec/cancan/model_adapters/active_record_adapter_spec.rb:249 # CanCan::ModelAdapters::ActiveRecordAdapter returns SQL for single `can` definition in front of default `cannot` condition\r\nrspec ./spec/cancan/model_adapters/active_record_adapter_spec.rb:273 # CanCan::ModelAdapters::ActiveRecordAdapter returns appropriate sql conditions in complex case\r\n```\r\n","created_at":"2016-01-18T23:26:47Z","updated_at":"2016-04-01T23:23:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f0c6fe33dc9db0afc57d53267d25d0cf76bf19e3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CanCanCommunity/cancancan/pulls/289/commits","review_comments_url":"https://api.github.com/repos/CanCanCommunity/cancancan/pulls/289/comments","review_comment_url":"https://api.github.com/repos/CanCanCommunity/cancancan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CanCanCommunity/cancancan/issues/289/comments","statuses_url":"https://api.github.com/repos/CanCanCommunity/cancancan/statuses/9090f1a5104e147970ba6347947f1cb675c6b832","head":{"label":"craig1410:rails_5","ref":"rails_5","sha":"9090f1a5104e147970ba6347947f1cb675c6b832","user":{"login":"craig1410","id":1668530,"avatar_url":"https://avatars.githubusercontent.com/u/1668530?v=3","gravatar_id":"","url":"https://api.github.com/users/craig1410","html_url":"https://github.com/craig1410","followers_url":"https://api.github.com/users/craig1410/followers","following_url":"https://api.github.com/users/craig1410/following{/other_user}","gists_url":"https://api.github.com/users/craig1410/gists{/gist_id}","starred_url":"https://api.github.com/users/craig1410/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craig1410/subscriptions","organizations_url":"https://api.github.com/users/craig1410/orgs","repos_url":"https://api.github.com/users/craig1410/repos","events_url":"https://api.github.com/users/craig1410/events{/privacy}","received_events_url":"https://api.github.com/users/craig1410/received_events","type":"User","site_admin":false},"repo":{"id":48404216,"name":"cancancan","full_name":"craig1410/cancancan","owner":{"login":"craig1410","id":1668530,"avatar_url":"https://avatars.githubusercontent.com/u/1668530?v=3","gravatar_id":"","url":"https://api.github.com/users/craig1410","html_url":"https://github.com/craig1410","followers_url":"https://api.github.com/users/craig1410/followers","following_url":"https://api.github.com/users/craig1410/following{/other_user}","gists_url":"https://api.github.com/users/craig1410/gists{/gist_id}","starred_url":"https://api.github.com/users/craig1410/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craig1410/subscriptions","organizations_url":"https://api.github.com/users/craig1410/orgs","repos_url":"https://api.github.com/users/craig1410/repos","events_url":"https://api.github.com/users/craig1410/events{/privacy}","received_events_url":"https://api.github.com/users/craig1410/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/craig1410/cancancan","description":"Continuation of CanCan, the authorization Gem for Ruby on Rails.","fork":true,"url":"https://api.github.com/repos/craig1410/cancancan","forks_url":"https://api.github.com/repos/craig1410/cancancan/forks","keys_url":"https://api.github.com/repos/craig1410/cancancan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/craig1410/cancancan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/craig1410/cancancan/teams","hooks_url":"https://api.github.com/repos/craig1410/cancancan/hooks","issue_events_url":"https://api.github.com/repos/craig1410/cancancan/issues/events{/number}","events_url":"https://api.github.com/repos/craig1410/cancancan/events","assignees_url":"https://api.github.com/repos/craig1410/cancancan/assignees{/user}","branches_url":"https://api.github.com/repos/craig1410/cancancan/branches{/branch}","tags_url":"https://api.github.com/repos/craig1410/cancancan/tags","blobs_url":"https://api.github.com/repos/craig1410/cancancan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/craig1410/cancancan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/craig1410/cancancan/git/refs{/sha}","trees_url":"https://api.github.com/repos/craig1410/cancancan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/craig1410/cancancan/statuses/{sha}","languages_url":"https://api.github.com/repos/craig1410/cancancan/languages","stargazers_url":"https://api.github.com/repos/craig1410/cancancan/stargazers","contributors_url":"https://api.github.com/repos/craig1410/cancancan/contributors","subscribers_url":"https://api.github.com/repos/craig1410/cancancan/subscribers","subscription_url":"https://api.github.com/repos/craig1410/cancancan/subscription","commits_url":"https://api.github.com/repos/craig1410/cancancan/commits{/sha}","git_commits_url":"https://api.github.com/repos/craig1410/cancancan/git/commits{/sha}","comments_url":"https://api.github.com/repos/craig1410/cancancan/comments{/number}","issue_comment_url":"https://api.github.com/repos/craig1410/cancancan/issues/comments{/number}","contents_url":"https://api.github.com/repos/craig1410/cancancan/contents/{+path}","compare_url":"https://api.github.com/repos/craig1410/cancancan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/craig1410/cancancan/merges","archive_url":"https://api.github.com/repos/craig1410/cancancan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/craig1410/cancancan/downloads","issues_url":"https://api.github.com/repos/craig1410/cancancan/issues{/number}","pulls_url":"https://api.github.com/repos/craig1410/cancancan/pulls{/number}","milestones_url":"https://api.github.com/repos/craig1410/cancancan/milestones{/number}","notifications_url":"https://api.github.com/repos/craig1410/cancancan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/craig1410/cancancan/labels{/name}","releases_url":"https://api.github.com/repos/craig1410/cancancan/releases{/id}","deployments_url":"https://api.github.com/repos/craig1410/cancancan/deployments","created_at":"2015-12-22T01:53:42Z","updated_at":"2016-01-18T22:24:14Z","pushed_at":"2016-02-24T01:41:20Z","git_url":"git://github.com/craig1410/cancancan.git","ssh_url":"git@github.com:craig1410/cancancan.git","clone_url":"https://github.com/craig1410/cancancan.git","svn_url":"https://github.com/craig1410/cancancan","homepage":"","size":731,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"CanCanCommunity:develop","ref":"develop","sha":"3e3c3666f74cf91201a9142578f09a53b6287726","user":{"login":"CanCanCommunity","id":6765080,"avatar_url":"https://avatars.githubusercontent.com/u/6765080?v=3","gravatar_id":"","url":"https://api.github.com/users/CanCanCommunity","html_url":"https://github.com/CanCanCommunity","followers_url":"https://api.github.com/users/CanCanCommunity/followers","following_url":"https://api.github.com/users/CanCanCommunity/following{/other_user}","gists_url":"https://api.github.com/users/CanCanCommunity/gists{/gist_id}","starred_url":"https://api.github.com/users/CanCanCommunity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CanCanCommunity/subscriptions","organizations_url":"https://api.github.com/users/CanCanCommunity/orgs","repos_url":"https://api.github.com/users/CanCanCommunity/repos","events_url":"https://api.github.com/users/CanCanCommunity/events{/privacy}","received_events_url":"https://api.github.com/users/CanCanCommunity/received_events","type":"Organization","site_admin":false},"repo":{"id":16994115,"name":"cancancan","full_name":"CanCanCommunity/cancancan","owner":{"login":"CanCanCommunity","id":6765080,"avatar_url":"https://avatars.githubusercontent.com/u/6765080?v=3","gravatar_id":"","url":"https://api.github.com/users/CanCanCommunity","html_url":"https://github.com/CanCanCommunity","followers_url":"https://api.github.com/users/CanCanCommunity/followers","following_url":"https://api.github.com/users/CanCanCommunity/following{/other_user}","gists_url":"https://api.github.com/users/CanCanCommunity/gists{/gist_id}","starred_url":"https://api.github.com/users/CanCanCommunity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CanCanCommunity/subscriptions","organizations_url":"https://api.github.com/users/CanCanCommunity/orgs","repos_url":"https://api.github.com/users/CanCanCommunity/repos","events_url":"https://api.github.com/users/CanCanCommunity/events{/privacy}","received_events_url":"https://api.github.com/users/CanCanCommunity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CanCanCommunity/cancancan","description":"Continuation of CanCan, the authorization Gem for Ruby on Rails.","fork":false,"url":"https://api.github.com/repos/CanCanCommunity/cancancan","forks_url":"https://api.github.com/repos/CanCanCommunity/cancancan/forks","keys_url":"https://api.github.com/repos/CanCanCommunity/cancancan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CanCanCommunity/cancancan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CanCanCommunity/cancancan/teams","hooks_url":"https://api.github.com/repos/CanCanCommunity/cancancan/hooks","issue_events_url":"https://api.github.com/repos/CanCanCommunity/cancancan/issues/events{/number}","events_url":"https://api.github.com/repos/CanCanCommunity/cancancan/events","assignees_url":"https://api.github.com/repos/CanCanCommunity/cancancan/assignees{/user}","branches_url":"https://api.github.com/repos/CanCanCommunity/cancancan/branches{/branch}","tags_url":"https://api.github.com/repos/CanCanCommunity/cancancan/tags","blobs_url":"https://api.github.com/repos/CanCanCommunity/cancancan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CanCanCommunity/cancancan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CanCanCommunity/cancancan/git/refs{/sha}","trees_url":"https://api.github.com/repos/CanCanCommunity/cancancan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CanCanCommunity/cancancan/statuses/{sha}","languages_url":"https://api.github.com/repos/CanCanCommunity/cancancan/languages","stargazers_url":"https://api.github.com/repos/CanCanCommunity/cancancan/stargazers","contributors_url":"https://api.github.com/repos/CanCanCommunity/cancancan/contributors","subscribers_url":"https://api.github.com/repos/CanCanCommunity/cancancan/subscribers","subscription_url":"https://api.github.com/repos/CanCanCommunity/cancancan/subscription","commits_url":"https://api.github.com/repos/CanCanCommunity/cancancan/commits{/sha}","git_commits_url":"https://api.github.com/repos/CanCanCommunity/cancancan/git/commits{/sha}","comments_url":"https://api.github.com/repos/CanCanCommunity/cancancan/comments{/number}","issue_comment_url":"https://api.github.com/repos/CanCanCommunity/cancancan/issues/comments{/number}","contents_url":"https://api.github.com/repos/CanCanCommunity/cancancan/contents/{+path}","compare_url":"https://api.github.com/repos/CanCanCommunity/cancancan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CanCanCommunity/cancancan/merges","archive_url":"https://api.github.com/repos/CanCanCommunity/cancancan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CanCanCommunity/cancancan/downloads","issues_url":"https://api.github.com/repos/CanCanCommunity/cancancan/issues{/number}","pulls_url":"https://api.github.com/repos/CanCanCommunity/cancancan/pulls{/number}","milestones_url":"https://api.github.com/repos/CanCanCommunity/cancancan/milestones{/number}","notifications_url":"https://api.github.com/repos/CanCanCommunity/cancancan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CanCanCommunity/cancancan/labels{/name}","releases_url":"https://api.github.com/repos/CanCanCommunity/cancancan/releases{/id}","deployments_url":"https://api.github.com/repos/CanCanCommunity/cancancan/deployments","created_at":"2014-02-19T18:26:23Z","updated_at":"2016-04-01T18:15:40Z","pushed_at":"2016-03-29T14:13:28Z","git_url":"git://github.com/CanCanCommunity/cancancan.git","ssh_url":"git@github.com:CanCanCommunity/cancancan.git","clone_url":"https://github.com/CanCanCommunity/cancancan.git","svn_url":"https://github.com/CanCanCommunity/cancancan","homepage":"","size":1274,"stargazers_count":2807,"watchers_count":2807,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":274,"mirror_url":null,"open_issues_count":63,"forks":274,"open_issues":63,"watchers":2807,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CanCanCommunity/cancancan/pulls/289"},"html":{"href":"https://github.com/CanCanCommunity/cancancan/pull/289"},"issue":{"href":"https://api.github.com/repos/CanCanCommunity/cancancan/issues/289"},"comments":{"href":"https://api.github.com/repos/CanCanCommunity/cancancan/issues/289/comments"},"review_comments":{"href":"https://api.github.com/repos/CanCanCommunity/cancancan/pulls/289/comments"},"review_comment":{"href":"https://api.github.com/repos/CanCanCommunity/cancancan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CanCanCommunity/cancancan/pulls/289/commits"},"statuses":{"href":"https://api.github.com/repos/CanCanCommunity/cancancan/statuses/9090f1a5104e147970ba6347947f1cb675c6b832"}}}}