{"action":"created","comment":{"url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/comments/66974647","id":66974647,"diff_hunk":"@@ -0,0 +1,31 @@\n+<% params_to_keep = [:tagged_with, :q, :content_id, :options] %>\n+\n+<div id=\"filter_bar\">\n+  <h2><%= Alchemy.t('Filter') %></h2>\n+  <%= select_tag(\n+    'resource_filter',\n+    options_for_select(\n+      resource_filter_select, params[:filter]\n+    ),\n+    include_blank: Alchemy.t(:all, scope: \"admin.#{resource_name}.filter\"),","path":"app/views/alchemy/admin/resources/_filter_bar.html.erb","position":10,"original_position":10,"commit_id":"a9106d52196f29137ab0efcfe2cca418f006bfb8","original_commit_id":"a9106d52196f29137ab0efcfe2cca418f006bfb8","user":{"login":"tvdeyen","id":42868,"avatar_url":"https://avatars.githubusercontent.com/u/42868?v=3","gravatar_id":"","url":"https://api.github.com/users/tvdeyen","html_url":"https://github.com/tvdeyen","followers_url":"https://api.github.com/users/tvdeyen/followers","following_url":"https://api.github.com/users/tvdeyen/following{/other_user}","gists_url":"https://api.github.com/users/tvdeyen/gists{/gist_id}","starred_url":"https://api.github.com/users/tvdeyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tvdeyen/subscriptions","organizations_url":"https://api.github.com/users/tvdeyen/orgs","repos_url":"https://api.github.com/users/tvdeyen/repos","events_url":"https://api.github.com/users/tvdeyen/events{/privacy}","received_events_url":"https://api.github.com/users/tvdeyen/received_events","type":"User","site_admin":false},"body":"Ah, it's already scoped into `alchemy`, but we should still scope it into `alchemy.resources.yada`","created_at":"2016-06-14T13:57:49Z","updated_at":"2016-06-14T13:57:49Z","html_url":"https://github.com/AlchemyCMS/alchemy_cms/pull/1057#discussion_r66974647","pull_request_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/1057","_links":{"self":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/comments/66974647"},"html":{"href":"https://github.com/AlchemyCMS/alchemy_cms/pull/1057#discussion_r66974647"},"pull_request":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/1057"}}},"pull_request":{"url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/1057","id":73740630,"html_url":"https://github.com/AlchemyCMS/alchemy_cms/pull/1057","diff_url":"https://github.com/AlchemyCMS/alchemy_cms/pull/1057.diff","patch_url":"https://github.com/AlchemyCMS/alchemy_cms/pull/1057.patch","issue_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/1057","number":1057,"state":"open","locked":false,"title":"Introduce automatical module scope filters in admin view","user":{"login":"wdspkr","id":1218622,"avatar_url":"https://avatars.githubusercontent.com/u/1218622?v=3","gravatar_id":"","url":"https://api.github.com/users/wdspkr","html_url":"https://github.com/wdspkr","followers_url":"https://api.github.com/users/wdspkr/followers","following_url":"https://api.github.com/users/wdspkr/following{/other_user}","gists_url":"https://api.github.com/users/wdspkr/gists{/gist_id}","starred_url":"https://api.github.com/users/wdspkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wdspkr/subscriptions","organizations_url":"https://api.github.com/users/wdspkr/orgs","repos_url":"https://api.github.com/users/wdspkr/repos","events_url":"https://api.github.com/users/wdspkr/events{/privacy}","received_events_url":"https://api.github.com/users/wdspkr/received_events","type":"User","site_admin":false},"body":"When a modules resource provides a `filters` class method providing\r\nan array of strings, this will automatically show a select filter\r\nwith the strings as options that link to according scopes in the\r\nmodule admin view.\r\n\r\n**Example**\r\nGiven a module resource Event with the following code:\r\n\r\n    class Event < ActiveRecord::Base\r\n      def self.filters\r\n        %w(released unreleased)\r\n      end\r\n\r\n      scope :released, -> { where(released: true) }\r\n      scope :unreleased, -> { where(released: false) }\r\n    end\r\n\r\nThe module admin view will show a select filter with the values\r\n_all_, _released_ and _unreleased_ that link to the index page\r\nwith the according scope applied.","created_at":"2016-06-14T13:35:03Z","updated_at":"2016-06-14T13:57:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cbabf951513bd5e6bf34790384579d65cced0d80","assignee":{"login":"tvdeyen","id":42868,"avatar_url":"https://avatars.githubusercontent.com/u/42868?v=3","gravatar_id":"","url":"https://api.github.com/users/tvdeyen","html_url":"https://github.com/tvdeyen","followers_url":"https://api.github.com/users/tvdeyen/followers","following_url":"https://api.github.com/users/tvdeyen/following{/other_user}","gists_url":"https://api.github.com/users/tvdeyen/gists{/gist_id}","starred_url":"https://api.github.com/users/tvdeyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tvdeyen/subscriptions","organizations_url":"https://api.github.com/users/tvdeyen/orgs","repos_url":"https://api.github.com/users/tvdeyen/repos","events_url":"https://api.github.com/users/tvdeyen/events{/privacy}","received_events_url":"https://api.github.com/users/tvdeyen/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/milestones/16","html_url":"https://github.com/AlchemyCMS/alchemy_cms/milestones/3.4","labels_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/milestones/16/labels","id":1727629,"number":16,"title":"3.4","description":"","creator":{"login":"tvdeyen","id":42868,"avatar_url":"https://avatars.githubusercontent.com/u/42868?v=3","gravatar_id":"","url":"https://api.github.com/users/tvdeyen","html_url":"https://github.com/tvdeyen","followers_url":"https://api.github.com/users/tvdeyen/followers","following_url":"https://api.github.com/users/tvdeyen/following{/other_user}","gists_url":"https://api.github.com/users/tvdeyen/gists{/gist_id}","starred_url":"https://api.github.com/users/tvdeyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tvdeyen/subscriptions","organizations_url":"https://api.github.com/users/tvdeyen/orgs","repos_url":"https://api.github.com/users/tvdeyen/repos","events_url":"https://api.github.com/users/tvdeyen/events{/privacy}","received_events_url":"https://api.github.com/users/tvdeyen/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":21,"state":"open","created_at":"2016-04-24T20:58:11Z","updated_at":"2016-06-14T13:54:59Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/1057/commits","review_comments_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/1057/comments","review_comment_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/1057/comments","statuses_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/statuses/a9106d52196f29137ab0efcfe2cca418f006bfb8","head":{"label":"AlchemyCMS:show-module-filters-automatically","ref":"show-module-filters-automatically","sha":"a9106d52196f29137ab0efcfe2cca418f006bfb8","user":{"login":"AlchemyCMS","id":6218554,"avatar_url":"https://avatars.githubusercontent.com/u/6218554?v=3","gravatar_id":"","url":"https://api.github.com/users/AlchemyCMS","html_url":"https://github.com/AlchemyCMS","followers_url":"https://api.github.com/users/AlchemyCMS/followers","following_url":"https://api.github.com/users/AlchemyCMS/following{/other_user}","gists_url":"https://api.github.com/users/AlchemyCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/AlchemyCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlchemyCMS/subscriptions","organizations_url":"https://api.github.com/users/AlchemyCMS/orgs","repos_url":"https://api.github.com/users/AlchemyCMS/repos","events_url":"https://api.github.com/users/AlchemyCMS/events{/privacy}","received_events_url":"https://api.github.com/users/AlchemyCMS/received_events","type":"Organization","site_admin":false},"repo":{"id":1581769,"name":"alchemy_cms","full_name":"AlchemyCMS/alchemy_cms","owner":{"login":"AlchemyCMS","id":6218554,"avatar_url":"https://avatars.githubusercontent.com/u/6218554?v=3","gravatar_id":"","url":"https://api.github.com/users/AlchemyCMS","html_url":"https://github.com/AlchemyCMS","followers_url":"https://api.github.com/users/AlchemyCMS/followers","following_url":"https://api.github.com/users/AlchemyCMS/following{/other_user}","gists_url":"https://api.github.com/users/AlchemyCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/AlchemyCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlchemyCMS/subscriptions","organizations_url":"https://api.github.com/users/AlchemyCMS/orgs","repos_url":"https://api.github.com/users/AlchemyCMS/repos","events_url":"https://api.github.com/users/AlchemyCMS/events{/privacy}","received_events_url":"https://api.github.com/users/AlchemyCMS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AlchemyCMS/alchemy_cms","description":"Alchemy is a powerful, flexible and user centric Rails CMS.","fork":false,"url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms","forks_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/forks","keys_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/teams","hooks_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/hooks","issue_events_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/events{/number}","events_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/events","assignees_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/assignees{/user}","branches_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/branches{/branch}","tags_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/tags","blobs_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/statuses/{sha}","languages_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/languages","stargazers_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/stargazers","contributors_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/contributors","subscribers_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/subscribers","subscription_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/subscription","commits_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/contents/{+path}","compare_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/merges","archive_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/downloads","issues_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues{/number}","pulls_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls{/number}","milestones_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/milestones{/number}","notifications_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/labels{/name}","releases_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/releases{/id}","deployments_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/deployments","created_at":"2011-04-07T10:37:01Z","updated_at":"2016-06-14T12:51:07Z","pushed_at":"2016-06-14T13:35:03Z","git_url":"git://github.com/AlchemyCMS/alchemy_cms.git","ssh_url":"git@github.com:AlchemyCMS/alchemy_cms.git","clone_url":"https://github.com/AlchemyCMS/alchemy_cms.git","svn_url":"https://github.com/AlchemyCMS/alchemy_cms","homepage":"http://alchemy-cms.com","size":18118,"stargazers_count":404,"watchers_count":404,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":185,"mirror_url":null,"open_issues_count":31,"forks":185,"open_issues":31,"watchers":404,"default_branch":"master"}},"base":{"label":"AlchemyCMS:master","ref":"master","sha":"0b96eeda859b26b9a63d7dea599921ed239c124f","user":{"login":"AlchemyCMS","id":6218554,"avatar_url":"https://avatars.githubusercontent.com/u/6218554?v=3","gravatar_id":"","url":"https://api.github.com/users/AlchemyCMS","html_url":"https://github.com/AlchemyCMS","followers_url":"https://api.github.com/users/AlchemyCMS/followers","following_url":"https://api.github.com/users/AlchemyCMS/following{/other_user}","gists_url":"https://api.github.com/users/AlchemyCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/AlchemyCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlchemyCMS/subscriptions","organizations_url":"https://api.github.com/users/AlchemyCMS/orgs","repos_url":"https://api.github.com/users/AlchemyCMS/repos","events_url":"https://api.github.com/users/AlchemyCMS/events{/privacy}","received_events_url":"https://api.github.com/users/AlchemyCMS/received_events","type":"Organization","site_admin":false},"repo":{"id":1581769,"name":"alchemy_cms","full_name":"AlchemyCMS/alchemy_cms","owner":{"login":"AlchemyCMS","id":6218554,"avatar_url":"https://avatars.githubusercontent.com/u/6218554?v=3","gravatar_id":"","url":"https://api.github.com/users/AlchemyCMS","html_url":"https://github.com/AlchemyCMS","followers_url":"https://api.github.com/users/AlchemyCMS/followers","following_url":"https://api.github.com/users/AlchemyCMS/following{/other_user}","gists_url":"https://api.github.com/users/AlchemyCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/AlchemyCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlchemyCMS/subscriptions","organizations_url":"https://api.github.com/users/AlchemyCMS/orgs","repos_url":"https://api.github.com/users/AlchemyCMS/repos","events_url":"https://api.github.com/users/AlchemyCMS/events{/privacy}","received_events_url":"https://api.github.com/users/AlchemyCMS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AlchemyCMS/alchemy_cms","description":"Alchemy is a powerful, flexible and user centric Rails CMS.","fork":false,"url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms","forks_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/forks","keys_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/teams","hooks_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/hooks","issue_events_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/events{/number}","events_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/events","assignees_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/assignees{/user}","branches_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/branches{/branch}","tags_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/tags","blobs_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/statuses/{sha}","languages_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/languages","stargazers_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/stargazers","contributors_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/contributors","subscribers_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/subscribers","subscription_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/subscription","commits_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/contents/{+path}","compare_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/merges","archive_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/downloads","issues_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues{/number}","pulls_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls{/number}","milestones_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/milestones{/number}","notifications_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/labels{/name}","releases_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/releases{/id}","deployments_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/deployments","created_at":"2011-04-07T10:37:01Z","updated_at":"2016-06-14T12:51:07Z","pushed_at":"2016-06-14T13:35:03Z","git_url":"git://github.com/AlchemyCMS/alchemy_cms.git","ssh_url":"git@github.com:AlchemyCMS/alchemy_cms.git","clone_url":"https://github.com/AlchemyCMS/alchemy_cms.git","svn_url":"https://github.com/AlchemyCMS/alchemy_cms","homepage":"http://alchemy-cms.com","size":18118,"stargazers_count":404,"watchers_count":404,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":185,"mirror_url":null,"open_issues_count":31,"forks":185,"open_issues":31,"watchers":404,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/1057"},"html":{"href":"https://github.com/AlchemyCMS/alchemy_cms/pull/1057"},"issue":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/1057"},"comments":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/1057/comments"},"review_comments":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/1057/comments"},"review_comment":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/1057/commits"},"statuses":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/statuses/a9106d52196f29137ab0efcfe2cca418f006bfb8"}}}}
{"actor":{"display_login":"tvdeyen"}}