{"action":"created","comment":{"url":"https://api.github.com/repos/FlyoverWorks/storytime/pulls/comments/23867687","id":23867687,"diff_hunk":"@@ -0,0 +1,83 @@\n+require_dependency \"storytime/application_controller\"\n+\n+module Storytime\n+  module Dashboard\n+    class SubscriptionsController < DashboardController\n+      skip_before_action :authenticate_user!, only: [:unsubscribe]\n+      skip_before_action :verify_storytime_user, only: [:unsubscribe]\n+      \n+      before_action :load_subscriptions, only: [:index]\n+      before_action :set_subscription, only: [:edit, :update, :destroy]\n+\n+      skip_after_action :verify_authorized, only: [:unsubscribe]\n+\n+      respond_to :json, only: :destroy\n+\n+      def index\n+        authorize @subscriptions\n+      end\n+\n+      def new\n+        @subscription = Storytime::Subscription.new\n+        authorize @subscription\n+      end\n+\n+      def create\n+        @subscription = Storytime::Subscription.new(subscription_params)\n+        authorize @subscription","path":"app/controllers/storytime/dashboard/subscriptions_controller.rb","position":27,"original_position":27,"commit_id":"9c4c2d72eeb5117dc56a3acfddc35d4a70575c86","original_commit_id":"9c4c2d72eeb5117dc56a3acfddc35d4a70575c86","user":{"login":"bcroesch","id":402710,"avatar_url":"https://avatars.githubusercontent.com/u/402710?v=3","gravatar_id":"","url":"https://api.github.com/users/bcroesch","html_url":"https://github.com/bcroesch","followers_url":"https://api.github.com/users/bcroesch/followers","following_url":"https://api.github.com/users/bcroesch/following{/other_user}","gists_url":"https://api.github.com/users/bcroesch/gists{/gist_id}","starred_url":"https://api.github.com/users/bcroesch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcroesch/subscriptions","organizations_url":"https://api.github.com/users/bcroesch/orgs","repos_url":"https://api.github.com/users/bcroesch/repos","events_url":"https://api.github.com/users/bcroesch/events{/privacy}","received_events_url":"https://api.github.com/users/bcroesch/received_events","type":"User","site_admin":false},"body":"Should also set the site id here","created_at":"2015-01-30T19:54:21Z","updated_at":"2015-01-30T19:54:21Z","html_url":"https://github.com/FlyoverWorks/storytime/pull/70#discussion_r23867687","pull_request_url":"https://api.github.com/repos/FlyoverWorks/storytime/pulls/70","_links":{"self":{"href":"https://api.github.com/repos/FlyoverWorks/storytime/pulls/comments/23867687"},"html":{"href":"https://github.com/FlyoverWorks/storytime/pull/70#discussion_r23867687"},"pull_request":{"href":"https://api.github.com/repos/FlyoverWorks/storytime/pulls/70"}}},"pull_request":{"url":"https://api.github.com/repos/FlyoverWorks/storytime/pulls/70","id":28378263,"html_url":"https://github.com/FlyoverWorks/storytime/pull/70","diff_url":"https://github.com/FlyoverWorks/storytime/pull/70.diff","patch_url":"https://github.com/FlyoverWorks/storytime/pull/70.patch","issue_url":"https://api.github.com/repos/FlyoverWorks/storytime/issues/70","number":70,"state":"open","locked":false,"title":"Subscription emails","user":{"login":"eanlain","id":3578866,"avatar_url":"https://avatars.githubusercontent.com/u/3578866?v=3","gravatar_id":"","url":"https://api.github.com/users/eanlain","html_url":"https://github.com/eanlain","followers_url":"https://api.github.com/users/eanlain/followers","following_url":"https://api.github.com/users/eanlain/following{/other_user}","gists_url":"https://api.github.com/users/eanlain/gists{/gist_id}","starred_url":"https://api.github.com/users/eanlain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eanlain/subscriptions","organizations_url":"https://api.github.com/users/eanlain/orgs","repos_url":"https://api.github.com/users/eanlain/repos","events_url":"https://api.github.com/users/eanlain/events{/privacy}","received_events_url":"https://api.github.com/users/eanlain/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-30T17:29:51Z","updated_at":"2015-01-30T19:54:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FlyoverWorks/storytime/pulls/70/commits","review_comments_url":"https://api.github.com/repos/FlyoverWorks/storytime/pulls/70/comments","review_comment_url":"https://api.github.com/repos/FlyoverWorks/storytime/pulls/comments/{number}","comments_url":"https://api.github.com/repos/FlyoverWorks/storytime/issues/70/comments","statuses_url":"https://api.github.com/repos/FlyoverWorks/storytime/statuses/9c4c2d72eeb5117dc56a3acfddc35d4a70575c86","head":{"label":"FlyoverWorks:subscription_emails","ref":"subscription_emails","sha":"9c4c2d72eeb5117dc56a3acfddc35d4a70575c86","user":{"login":"FlyoverWorks","id":7969928,"avatar_url":"https://avatars.githubusercontent.com/u/7969928?v=3","gravatar_id":"","url":"https://api.github.com/users/FlyoverWorks","html_url":"https://github.com/FlyoverWorks","followers_url":"https://api.github.com/users/FlyoverWorks/followers","following_url":"https://api.github.com/users/FlyoverWorks/following{/other_user}","gists_url":"https://api.github.com/users/FlyoverWorks/gists{/gist_id}","starred_url":"https://api.github.com/users/FlyoverWorks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlyoverWorks/subscriptions","organizations_url":"https://api.github.com/users/FlyoverWorks/orgs","repos_url":"https://api.github.com/users/FlyoverWorks/repos","events_url":"https://api.github.com/users/FlyoverWorks/events{/privacy}","received_events_url":"https://api.github.com/users/FlyoverWorks/received_events","type":"Organization","site_admin":false},"repo":{"id":19585523,"name":"storytime","full_name":"FlyoverWorks/storytime","owner":{"login":"FlyoverWorks","id":7969928,"avatar_url":"https://avatars.githubusercontent.com/u/7969928?v=3","gravatar_id":"","url":"https://api.github.com/users/FlyoverWorks","html_url":"https://github.com/FlyoverWorks","followers_url":"https://api.github.com/users/FlyoverWorks/followers","following_url":"https://api.github.com/users/FlyoverWorks/following{/other_user}","gists_url":"https://api.github.com/users/FlyoverWorks/gists{/gist_id}","starred_url":"https://api.github.com/users/FlyoverWorks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlyoverWorks/subscriptions","organizations_url":"https://api.github.com/users/FlyoverWorks/orgs","repos_url":"https://api.github.com/users/FlyoverWorks/repos","events_url":"https://api.github.com/users/FlyoverWorks/events{/privacy}","received_events_url":"https://api.github.com/users/FlyoverWorks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FlyoverWorks/storytime","description":"Storytime is Rails 4+ CMS and blogging engine, with a core focus on content. It is built and maintained by @flyoverworks.","fork":false,"url":"https://api.github.com/repos/FlyoverWorks/storytime","forks_url":"https://api.github.com/repos/FlyoverWorks/storytime/forks","keys_url":"https://api.github.com/repos/FlyoverWorks/storytime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FlyoverWorks/storytime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FlyoverWorks/storytime/teams","hooks_url":"https://api.github.com/repos/FlyoverWorks/storytime/hooks","issue_events_url":"https://api.github.com/repos/FlyoverWorks/storytime/issues/events{/number}","events_url":"https://api.github.com/repos/FlyoverWorks/storytime/events","assignees_url":"https://api.github.com/repos/FlyoverWorks/storytime/assignees{/user}","branches_url":"https://api.github.com/repos/FlyoverWorks/storytime/branches{/branch}","tags_url":"https://api.github.com/repos/FlyoverWorks/storytime/tags","blobs_url":"https://api.github.com/repos/FlyoverWorks/storytime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FlyoverWorks/storytime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FlyoverWorks/storytime/git/refs{/sha}","trees_url":"https://api.github.com/repos/FlyoverWorks/storytime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FlyoverWorks/storytime/statuses/{sha}","languages_url":"https://api.github.com/repos/FlyoverWorks/storytime/languages","stargazers_url":"https://api.github.com/repos/FlyoverWorks/storytime/stargazers","contributors_url":"https://api.github.com/repos/FlyoverWorks/storytime/contributors","subscribers_url":"https://api.github.com/repos/FlyoverWorks/storytime/subscribers","subscription_url":"https://api.github.com/repos/FlyoverWorks/storytime/subscription","commits_url":"https://api.github.com/repos/FlyoverWorks/storytime/commits{/sha}","git_commits_url":"https://api.github.com/repos/FlyoverWorks/storytime/git/commits{/sha}","comments_url":"https://api.github.com/repos/FlyoverWorks/storytime/comments{/number}","issue_comment_url":"https://api.github.com/repos/FlyoverWorks/storytime/issues/comments/{number}","contents_url":"https://api.github.com/repos/FlyoverWorks/storytime/contents/{+path}","compare_url":"https://api.github.com/repos/FlyoverWorks/storytime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FlyoverWorks/storytime/merges","archive_url":"https://api.github.com/repos/FlyoverWorks/storytime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FlyoverWorks/storytime/downloads","issues_url":"https://api.github.com/repos/FlyoverWorks/storytime/issues{/number}","pulls_url":"https://api.github.com/repos/FlyoverWorks/storytime/pulls{/number}","milestones_url":"https://api.github.com/repos/FlyoverWorks/storytime/milestones{/number}","notifications_url":"https://api.github.com/repos/FlyoverWorks/storytime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FlyoverWorks/storytime/labels{/name}","releases_url":"https://api.github.com/repos/FlyoverWorks/storytime/releases{/id}","created_at":"2014-05-08T19:09:30Z","updated_at":"2015-01-25T22:22:15Z","pushed_at":"2015-01-30T17:26:34Z","git_url":"git://github.com/FlyoverWorks/storytime.git","ssh_url":"git@github.com:FlyoverWorks/storytime.git","clone_url":"https://github.com/FlyoverWorks/storytime.git","svn_url":"https://github.com/FlyoverWorks/storytime","homepage":"","size":3765,"stargazers_count":270,"watchers_count":270,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":7,"forks":7,"open_issues":7,"watchers":270,"default_branch":"master"}},"base":{"label":"FlyoverWorks:dev","ref":"dev","sha":"6d4226510acf6ceacb20c1e10ac171fdd683e583","user":{"login":"FlyoverWorks","id":7969928,"avatar_url":"https://avatars.githubusercontent.com/u/7969928?v=3","gravatar_id":"","url":"https://api.github.com/users/FlyoverWorks","html_url":"https://github.com/FlyoverWorks","followers_url":"https://api.github.com/users/FlyoverWorks/followers","following_url":"https://api.github.com/users/FlyoverWorks/following{/other_user}","gists_url":"https://api.github.com/users/FlyoverWorks/gists{/gist_id}","starred_url":"https://api.github.com/users/FlyoverWorks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlyoverWorks/subscriptions","organizations_url":"https://api.github.com/users/FlyoverWorks/orgs","repos_url":"https://api.github.com/users/FlyoverWorks/repos","events_url":"https://api.github.com/users/FlyoverWorks/events{/privacy}","received_events_url":"https://api.github.com/users/FlyoverWorks/received_events","type":"Organization","site_admin":false},"repo":{"id":19585523,"name":"storytime","full_name":"FlyoverWorks/storytime","owner":{"login":"FlyoverWorks","id":7969928,"avatar_url":"https://avatars.githubusercontent.com/u/7969928?v=3","gravatar_id":"","url":"https://api.github.com/users/FlyoverWorks","html_url":"https://github.com/FlyoverWorks","followers_url":"https://api.github.com/users/FlyoverWorks/followers","following_url":"https://api.github.com/users/FlyoverWorks/following{/other_user}","gists_url":"https://api.github.com/users/FlyoverWorks/gists{/gist_id}","starred_url":"https://api.github.com/users/FlyoverWorks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlyoverWorks/subscriptions","organizations_url":"https://api.github.com/users/FlyoverWorks/orgs","repos_url":"https://api.github.com/users/FlyoverWorks/repos","events_url":"https://api.github.com/users/FlyoverWorks/events{/privacy}","received_events_url":"https://api.github.com/users/FlyoverWorks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FlyoverWorks/storytime","description":"Storytime is Rails 4+ CMS and blogging engine, with a core focus on content. It is built and maintained by @flyoverworks.","fork":false,"url":"https://api.github.com/repos/FlyoverWorks/storytime","forks_url":"https://api.github.com/repos/FlyoverWorks/storytime/forks","keys_url":"https://api.github.com/repos/FlyoverWorks/storytime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FlyoverWorks/storytime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FlyoverWorks/storytime/teams","hooks_url":"https://api.github.com/repos/FlyoverWorks/storytime/hooks","issue_events_url":"https://api.github.com/repos/FlyoverWorks/storytime/issues/events{/number}","events_url":"https://api.github.com/repos/FlyoverWorks/storytime/events","assignees_url":"https://api.github.com/repos/FlyoverWorks/storytime/assignees{/user}","branches_url":"https://api.github.com/repos/FlyoverWorks/storytime/branches{/branch}","tags_url":"https://api.github.com/repos/FlyoverWorks/storytime/tags","blobs_url":"https://api.github.com/repos/FlyoverWorks/storytime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FlyoverWorks/storytime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FlyoverWorks/storytime/git/refs{/sha}","trees_url":"https://api.github.com/repos/FlyoverWorks/storytime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FlyoverWorks/storytime/statuses/{sha}","languages_url":"https://api.github.com/repos/FlyoverWorks/storytime/languages","stargazers_url":"https://api.github.com/repos/FlyoverWorks/storytime/stargazers","contributors_url":"https://api.github.com/repos/FlyoverWorks/storytime/contributors","subscribers_url":"https://api.github.com/repos/FlyoverWorks/storytime/subscribers","subscription_url":"https://api.github.com/repos/FlyoverWorks/storytime/subscription","commits_url":"https://api.github.com/repos/FlyoverWorks/storytime/commits{/sha}","git_commits_url":"https://api.github.com/repos/FlyoverWorks/storytime/git/commits{/sha}","comments_url":"https://api.github.com/repos/FlyoverWorks/storytime/comments{/number}","issue_comment_url":"https://api.github.com/repos/FlyoverWorks/storytime/issues/comments/{number}","contents_url":"https://api.github.com/repos/FlyoverWorks/storytime/contents/{+path}","compare_url":"https://api.github.com/repos/FlyoverWorks/storytime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FlyoverWorks/storytime/merges","archive_url":"https://api.github.com/repos/FlyoverWorks/storytime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FlyoverWorks/storytime/downloads","issues_url":"https://api.github.com/repos/FlyoverWorks/storytime/issues{/number}","pulls_url":"https://api.github.com/repos/FlyoverWorks/storytime/pulls{/number}","milestones_url":"https://api.github.com/repos/FlyoverWorks/storytime/milestones{/number}","notifications_url":"https://api.github.com/repos/FlyoverWorks/storytime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FlyoverWorks/storytime/labels{/name}","releases_url":"https://api.github.com/repos/FlyoverWorks/storytime/releases{/id}","created_at":"2014-05-08T19:09:30Z","updated_at":"2015-01-25T22:22:15Z","pushed_at":"2015-01-30T17:26:34Z","git_url":"git://github.com/FlyoverWorks/storytime.git","ssh_url":"git@github.com:FlyoverWorks/storytime.git","clone_url":"https://github.com/FlyoverWorks/storytime.git","svn_url":"https://github.com/FlyoverWorks/storytime","homepage":"","size":3765,"stargazers_count":270,"watchers_count":270,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":7,"forks":7,"open_issues":7,"watchers":270,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FlyoverWorks/storytime/pulls/70"},"html":{"href":"https://github.com/FlyoverWorks/storytime/pull/70"},"issue":{"href":"https://api.github.com/repos/FlyoverWorks/storytime/issues/70"},"comments":{"href":"https://api.github.com/repos/FlyoverWorks/storytime/issues/70/comments"},"review_comments":{"href":"https://api.github.com/repos/FlyoverWorks/storytime/pulls/70/comments"},"review_comment":{"href":"https://api.github.com/repos/FlyoverWorks/storytime/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/FlyoverWorks/storytime/pulls/70/commits"},"statuses":{"href":"https://api.github.com/repos/FlyoverWorks/storytime/statuses/9c4c2d72eeb5117dc56a3acfddc35d4a70575c86"}}}}