{"action":"created","comment":{"url":"https://api.github.com/repos/Blaze34/facilities/pulls/comments/26137121","id":26137121,"diff_hunk":"@@ -0,0 +1,42 @@\n+class StoragesController < ApplicationController\n+  load_and_authorize_resource :storage, through: :current_user, except: :show\n+  load_and_authorize_resource :storage, only: :show\n+\n+  def index\n+    render json: { resources: @storages.filter(index_params), count: @storages.length }","path":"app/controllers/storages_controller.rb","position":6,"original_position":6,"commit_id":"da451a142d267fbed8892e9311b18d0e2c7cfc79","original_commit_id":"da451a142d267fbed8892e9311b18d0e2c7cfc79","user":{"login":"Blaze34","id":3072720,"avatar_url":"https://avatars.githubusercontent.com/u/3072720?v=3","gravatar_id":"","url":"https://api.github.com/users/Blaze34","html_url":"https://github.com/Blaze34","followers_url":"https://api.github.com/users/Blaze34/followers","following_url":"https://api.github.com/users/Blaze34/following{/other_user}","gists_url":"https://api.github.com/users/Blaze34/gists{/gist_id}","starred_url":"https://api.github.com/users/Blaze34/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Blaze34/subscriptions","organizations_url":"https://api.github.com/users/Blaze34/orgs","repos_url":"https://api.github.com/users/Blaze34/repos","events_url":"https://api.github.com/users/Blaze34/events{/privacy}","received_events_url":"https://api.github.com/users/Blaze34/received_events","type":"User","site_admin":false},"body":"```\r\n@storages = @storages.search(params[:search]) if params[:search].present?\r\nrender json: { resources: @storages, count: @storages.length }\r\n```","created_at":"2015-03-10T16:19:17Z","updated_at":"2015-03-10T16:19:17Z","html_url":"https://github.com/Blaze34/facilities/pull/4#discussion_r26137121","pull_request_url":"https://api.github.com/repos/Blaze34/facilities/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/Blaze34/facilities/pulls/comments/26137121"},"html":{"href":"https://github.com/Blaze34/facilities/pull/4#discussion_r26137121"},"pull_request":{"href":"https://api.github.com/repos/Blaze34/facilities/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/Blaze34/facilities/pulls/4","id":30566784,"html_url":"https://github.com/Blaze34/facilities/pull/4","diff_url":"https://github.com/Blaze34/facilities/pull/4.diff","patch_url":"https://github.com/Blaze34/facilities/pull/4.patch","issue_url":"https://api.github.com/repos/Blaze34/facilities/issues/4","number":4,"state":"open","locked":false,"title":"Added storage and unit models. Wrote tests and controller for those mode...","user":{"login":"posterion","id":5526920,"avatar_url":"https://avatars.githubusercontent.com/u/5526920?v=3","gravatar_id":"","url":"https://api.github.com/users/posterion","html_url":"https://github.com/posterion","followers_url":"https://api.github.com/users/posterion/followers","following_url":"https://api.github.com/users/posterion/following{/other_user}","gists_url":"https://api.github.com/users/posterion/gists{/gist_id}","starred_url":"https://api.github.com/users/posterion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/posterion/subscriptions","organizations_url":"https://api.github.com/users/posterion/orgs","repos_url":"https://api.github.com/users/posterion/repos","events_url":"https://api.github.com/users/posterion/events{/privacy}","received_events_url":"https://api.github.com/users/posterion/received_events","type":"User","site_admin":false},"body":"...ls.","created_at":"2015-03-05T15:38:03Z","updated_at":"2015-03-10T16:19:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a731e0a4baadbf4b7c6e9a0731f7b0e05a029eb0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Blaze34/facilities/pulls/4/commits","review_comments_url":"https://api.github.com/repos/Blaze34/facilities/pulls/4/comments","review_comment_url":"https://api.github.com/repos/Blaze34/facilities/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Blaze34/facilities/issues/4/comments","statuses_url":"https://api.github.com/repos/Blaze34/facilities/statuses/da451a142d267fbed8892e9311b18d0e2c7cfc79","head":{"label":"Blaze34:storages","ref":"storages","sha":"da451a142d267fbed8892e9311b18d0e2c7cfc79","user":{"login":"Blaze34","id":3072720,"avatar_url":"https://avatars.githubusercontent.com/u/3072720?v=3","gravatar_id":"","url":"https://api.github.com/users/Blaze34","html_url":"https://github.com/Blaze34","followers_url":"https://api.github.com/users/Blaze34/followers","following_url":"https://api.github.com/users/Blaze34/following{/other_user}","gists_url":"https://api.github.com/users/Blaze34/gists{/gist_id}","starred_url":"https://api.github.com/users/Blaze34/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Blaze34/subscriptions","organizations_url":"https://api.github.com/users/Blaze34/orgs","repos_url":"https://api.github.com/users/Blaze34/repos","events_url":"https://api.github.com/users/Blaze34/events{/privacy}","received_events_url":"https://api.github.com/users/Blaze34/received_events","type":"User","site_admin":false},"repo":{"id":31529709,"name":"facilities","full_name":"Blaze34/facilities","owner":{"login":"Blaze34","id":3072720,"avatar_url":"https://avatars.githubusercontent.com/u/3072720?v=3","gravatar_id":"","url":"https://api.github.com/users/Blaze34","html_url":"https://github.com/Blaze34","followers_url":"https://api.github.com/users/Blaze34/followers","following_url":"https://api.github.com/users/Blaze34/following{/other_user}","gists_url":"https://api.github.com/users/Blaze34/gists{/gist_id}","starred_url":"https://api.github.com/users/Blaze34/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Blaze34/subscriptions","organizations_url":"https://api.github.com/users/Blaze34/orgs","repos_url":"https://api.github.com/users/Blaze34/repos","events_url":"https://api.github.com/users/Blaze34/events{/privacy}","received_events_url":"https://api.github.com/users/Blaze34/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Blaze34/facilities","description":"","fork":false,"url":"https://api.github.com/repos/Blaze34/facilities","forks_url":"https://api.github.com/repos/Blaze34/facilities/forks","keys_url":"https://api.github.com/repos/Blaze34/facilities/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Blaze34/facilities/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Blaze34/facilities/teams","hooks_url":"https://api.github.com/repos/Blaze34/facilities/hooks","issue_events_url":"https://api.github.com/repos/Blaze34/facilities/issues/events{/number}","events_url":"https://api.github.com/repos/Blaze34/facilities/events","assignees_url":"https://api.github.com/repos/Blaze34/facilities/assignees{/user}","branches_url":"https://api.github.com/repos/Blaze34/facilities/branches{/branch}","tags_url":"https://api.github.com/repos/Blaze34/facilities/tags","blobs_url":"https://api.github.com/repos/Blaze34/facilities/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Blaze34/facilities/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Blaze34/facilities/git/refs{/sha}","trees_url":"https://api.github.com/repos/Blaze34/facilities/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Blaze34/facilities/statuses/{sha}","languages_url":"https://api.github.com/repos/Blaze34/facilities/languages","stargazers_url":"https://api.github.com/repos/Blaze34/facilities/stargazers","contributors_url":"https://api.github.com/repos/Blaze34/facilities/contributors","subscribers_url":"https://api.github.com/repos/Blaze34/facilities/subscribers","subscription_url":"https://api.github.com/repos/Blaze34/facilities/subscription","commits_url":"https://api.github.com/repos/Blaze34/facilities/commits{/sha}","git_commits_url":"https://api.github.com/repos/Blaze34/facilities/git/commits{/sha}","comments_url":"https://api.github.com/repos/Blaze34/facilities/comments{/number}","issue_comment_url":"https://api.github.com/repos/Blaze34/facilities/issues/comments{/number}","contents_url":"https://api.github.com/repos/Blaze34/facilities/contents/{+path}","compare_url":"https://api.github.com/repos/Blaze34/facilities/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Blaze34/facilities/merges","archive_url":"https://api.github.com/repos/Blaze34/facilities/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Blaze34/facilities/downloads","issues_url":"https://api.github.com/repos/Blaze34/facilities/issues{/number}","pulls_url":"https://api.github.com/repos/Blaze34/facilities/pulls{/number}","milestones_url":"https://api.github.com/repos/Blaze34/facilities/milestones{/number}","notifications_url":"https://api.github.com/repos/Blaze34/facilities/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Blaze34/facilities/labels{/name}","releases_url":"https://api.github.com/repos/Blaze34/facilities/releases{/id}","created_at":"2015-03-02T08:11:17Z","updated_at":"2015-03-05T15:57:48Z","pushed_at":"2015-03-10T14:19:25Z","git_url":"git://github.com/Blaze34/facilities.git","ssh_url":"git@github.com:Blaze34/facilities.git","clone_url":"https://github.com/Blaze34/facilities.git","svn_url":"https://github.com/Blaze34/facilities","homepage":null,"size":28724,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Blaze34:develop","ref":"develop","sha":"8d3671d859f4e31f87d969f25b604739c27fe013","user":{"login":"Blaze34","id":3072720,"avatar_url":"https://avatars.githubusercontent.com/u/3072720?v=3","gravatar_id":"","url":"https://api.github.com/users/Blaze34","html_url":"https://github.com/Blaze34","followers_url":"https://api.github.com/users/Blaze34/followers","following_url":"https://api.github.com/users/Blaze34/following{/other_user}","gists_url":"https://api.github.com/users/Blaze34/gists{/gist_id}","starred_url":"https://api.github.com/users/Blaze34/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Blaze34/subscriptions","organizations_url":"https://api.github.com/users/Blaze34/orgs","repos_url":"https://api.github.com/users/Blaze34/repos","events_url":"https://api.github.com/users/Blaze34/events{/privacy}","received_events_url":"https://api.github.com/users/Blaze34/received_events","type":"User","site_admin":false},"repo":{"id":31529709,"name":"facilities","full_name":"Blaze34/facilities","owner":{"login":"Blaze34","id":3072720,"avatar_url":"https://avatars.githubusercontent.com/u/3072720?v=3","gravatar_id":"","url":"https://api.github.com/users/Blaze34","html_url":"https://github.com/Blaze34","followers_url":"https://api.github.com/users/Blaze34/followers","following_url":"https://api.github.com/users/Blaze34/following{/other_user}","gists_url":"https://api.github.com/users/Blaze34/gists{/gist_id}","starred_url":"https://api.github.com/users/Blaze34/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Blaze34/subscriptions","organizations_url":"https://api.github.com/users/Blaze34/orgs","repos_url":"https://api.github.com/users/Blaze34/repos","events_url":"https://api.github.com/users/Blaze34/events{/privacy}","received_events_url":"https://api.github.com/users/Blaze34/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Blaze34/facilities","description":"","fork":false,"url":"https://api.github.com/repos/Blaze34/facilities","forks_url":"https://api.github.com/repos/Blaze34/facilities/forks","keys_url":"https://api.github.com/repos/Blaze34/facilities/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Blaze34/facilities/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Blaze34/facilities/teams","hooks_url":"https://api.github.com/repos/Blaze34/facilities/hooks","issue_events_url":"https://api.github.com/repos/Blaze34/facilities/issues/events{/number}","events_url":"https://api.github.com/repos/Blaze34/facilities/events","assignees_url":"https://api.github.com/repos/Blaze34/facilities/assignees{/user}","branches_url":"https://api.github.com/repos/Blaze34/facilities/branches{/branch}","tags_url":"https://api.github.com/repos/Blaze34/facilities/tags","blobs_url":"https://api.github.com/repos/Blaze34/facilities/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Blaze34/facilities/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Blaze34/facilities/git/refs{/sha}","trees_url":"https://api.github.com/repos/Blaze34/facilities/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Blaze34/facilities/statuses/{sha}","languages_url":"https://api.github.com/repos/Blaze34/facilities/languages","stargazers_url":"https://api.github.com/repos/Blaze34/facilities/stargazers","contributors_url":"https://api.github.com/repos/Blaze34/facilities/contributors","subscribers_url":"https://api.github.com/repos/Blaze34/facilities/subscribers","subscription_url":"https://api.github.com/repos/Blaze34/facilities/subscription","commits_url":"https://api.github.com/repos/Blaze34/facilities/commits{/sha}","git_commits_url":"https://api.github.com/repos/Blaze34/facilities/git/commits{/sha}","comments_url":"https://api.github.com/repos/Blaze34/facilities/comments{/number}","issue_comment_url":"https://api.github.com/repos/Blaze34/facilities/issues/comments{/number}","contents_url":"https://api.github.com/repos/Blaze34/facilities/contents/{+path}","compare_url":"https://api.github.com/repos/Blaze34/facilities/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Blaze34/facilities/merges","archive_url":"https://api.github.com/repos/Blaze34/facilities/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Blaze34/facilities/downloads","issues_url":"https://api.github.com/repos/Blaze34/facilities/issues{/number}","pulls_url":"https://api.github.com/repos/Blaze34/facilities/pulls{/number}","milestones_url":"https://api.github.com/repos/Blaze34/facilities/milestones{/number}","notifications_url":"https://api.github.com/repos/Blaze34/facilities/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Blaze34/facilities/labels{/name}","releases_url":"https://api.github.com/repos/Blaze34/facilities/releases{/id}","created_at":"2015-03-02T08:11:17Z","updated_at":"2015-03-05T15:57:48Z","pushed_at":"2015-03-10T14:19:25Z","git_url":"git://github.com/Blaze34/facilities.git","ssh_url":"git@github.com:Blaze34/facilities.git","clone_url":"https://github.com/Blaze34/facilities.git","svn_url":"https://github.com/Blaze34/facilities","homepage":null,"size":28724,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Blaze34/facilities/pulls/4"},"html":{"href":"https://github.com/Blaze34/facilities/pull/4"},"issue":{"href":"https://api.github.com/repos/Blaze34/facilities/issues/4"},"comments":{"href":"https://api.github.com/repos/Blaze34/facilities/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/Blaze34/facilities/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/Blaze34/facilities/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Blaze34/facilities/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/Blaze34/facilities/statuses/da451a142d267fbed8892e9311b18d0e2c7cfc79"}}}}