{"action":"created","comment":{"url":"https://api.github.com/repos/platanus/procef-billings/pulls/comments/91359595","pull_request_review_id":11868817,"id":91359595,"diff_hunk":"@@ -0,0 +1,24 @@\n+class CreateReport\n+  attr_reader :data, :params\n+\n+  def initialize(params)\n+    calendar = Calendar.find_by!(pin: params[:pin])\n+    @params = params\n+    @data = report_params(calendar)\n+  end\n+\n+  def perform\n+    @report = Report.create(@data)\n+    @conclusion = CreateConclusion.new(@report.calendar_id, @report.date).perform\n+  end\n+\n+  private\n+\n+  def report_params(calendar)\n+    params.require(:report).permit(\n+      :calendar_id, :date, :lubrication, :transparency,\n+      :elasticity, :menstruation, :relation_am, :relation_pm\n+    ).merge(calendar_id: calendar.id)","path":"app/commands/create_report.rb","position":22,"original_position":21,"commit_id":"4f5bee20c1113723f3379434ef069084559948c4","original_commit_id":"c2b3ce601adbc8a91ca28a7c8d42d9d5c2c628ca","user":{"login":"ldlsegovia","id":3026413,"avatar_url":"https://avatars.githubusercontent.com/u/3026413?v=3","gravatar_id":"","url":"https://api.github.com/users/ldlsegovia","html_url":"https://github.com/ldlsegovia","followers_url":"https://api.github.com/users/ldlsegovia/followers","following_url":"https://api.github.com/users/ldlsegovia/following{/other_user}","gists_url":"https://api.github.com/users/ldlsegovia/gists{/gist_id}","starred_url":"https://api.github.com/users/ldlsegovia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldlsegovia/subscriptions","organizations_url":"https://api.github.com/users/ldlsegovia/orgs","repos_url":"https://api.github.com/users/ldlsegovia/repos","events_url":"https://api.github.com/users/ldlsegovia/events{/privacy}","received_events_url":"https://api.github.com/users/ldlsegovia/received_events","type":"User","site_admin":false},"body":"@farevalod esto no hace falta que lo hagas, por eso te preguntaba más temprano si calendar has_many reports. Podés hacer: `calendar.reports.create`","created_at":"2016-12-07T18:47:31Z","updated_at":"2016-12-07T18:47:31Z","html_url":"https://github.com/platanus/procef-billings/pull/2#discussion_r91359595","pull_request_url":"https://api.github.com/repos/platanus/procef-billings/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/platanus/procef-billings/pulls/comments/91359595"},"html":{"href":"https://github.com/platanus/procef-billings/pull/2#discussion_r91359595"},"pull_request":{"href":"https://api.github.com/repos/platanus/procef-billings/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/platanus/procef-billings/pulls/2","id":96775624,"html_url":"https://github.com/platanus/procef-billings/pull/2","diff_url":"https://github.com/platanus/procef-billings/pull/2.diff","patch_url":"https://github.com/platanus/procef-billings/pull/2.patch","issue_url":"https://api.github.com/repos/platanus/procef-billings/issues/2","number":2,"state":"open","locked":false,"title":"Conclusions index","user":{"login":"farevalod","id":279497,"avatar_url":"https://avatars.githubusercontent.com/u/279497?v=3","gravatar_id":"","url":"https://api.github.com/users/farevalod","html_url":"https://github.com/farevalod","followers_url":"https://api.github.com/users/farevalod/followers","following_url":"https://api.github.com/users/farevalod/following{/other_user}","gists_url":"https://api.github.com/users/farevalod/gists{/gist_id}","starred_url":"https://api.github.com/users/farevalod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farevalod/subscriptions","organizations_url":"https://api.github.com/users/farevalod/orgs","repos_url":"https://api.github.com/users/farevalod/repos","events_url":"https://api.github.com/users/farevalod/events{/privacy}","received_events_url":"https://api.github.com/users/farevalod/received_events","type":"User","site_admin":false},"body":"* Index de conclusiones desde fecha del último sync: [GET] /conclusions?pin=1234&since=\"2016-12-01\"\r\n* Comando CreateConclusion, que toma date y pin, y crea la conclusión correspondiente\r\n* Agregada una llamada a CreateConclusion al controlador de reports, para generar la conclusión correspondiente cada vez que se reciben datos nuevos.","created_at":"2016-12-06T18:06:18Z","updated_at":"2016-12-07T18:47:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4ce04423e9fad2fcd5cfa03f4c8ad6d18b456e3","assignee":{"login":"bunzli","id":741483,"avatar_url":"https://avatars.githubusercontent.com/u/741483?v=3","gravatar_id":"","url":"https://api.github.com/users/bunzli","html_url":"https://github.com/bunzli","followers_url":"https://api.github.com/users/bunzli/followers","following_url":"https://api.github.com/users/bunzli/following{/other_user}","gists_url":"https://api.github.com/users/bunzli/gists{/gist_id}","starred_url":"https://api.github.com/users/bunzli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bunzli/subscriptions","organizations_url":"https://api.github.com/users/bunzli/orgs","repos_url":"https://api.github.com/users/bunzli/repos","events_url":"https://api.github.com/users/bunzli/events{/privacy}","received_events_url":"https://api.github.com/users/bunzli/received_events","type":"User","site_admin":false},"assignees":[{"login":"bunzli","id":741483,"avatar_url":"https://avatars.githubusercontent.com/u/741483?v=3","gravatar_id":"","url":"https://api.github.com/users/bunzli","html_url":"https://github.com/bunzli","followers_url":"https://api.github.com/users/bunzli/followers","following_url":"https://api.github.com/users/bunzli/following{/other_user}","gists_url":"https://api.github.com/users/bunzli/gists{/gist_id}","starred_url":"https://api.github.com/users/bunzli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bunzli/subscriptions","organizations_url":"https://api.github.com/users/bunzli/orgs","repos_url":"https://api.github.com/users/bunzli/repos","events_url":"https://api.github.com/users/bunzli/events{/privacy}","received_events_url":"https://api.github.com/users/bunzli/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/platanus/procef-billings/pulls/2/commits","review_comments_url":"https://api.github.com/repos/platanus/procef-billings/pulls/2/comments","review_comment_url":"https://api.github.com/repos/platanus/procef-billings/pulls/comments{/number}","comments_url":"https://api.github.com/repos/platanus/procef-billings/issues/2/comments","statuses_url":"https://api.github.com/repos/platanus/procef-billings/statuses/4f5bee20c1113723f3379434ef069084559948c4","head":{"label":"platanus:conclusions-index","ref":"conclusions-index","sha":"4f5bee20c1113723f3379434ef069084559948c4","user":{"login":"platanus","id":1158740,"avatar_url":"https://avatars.githubusercontent.com/u/1158740?v=3","gravatar_id":"","url":"https://api.github.com/users/platanus","html_url":"https://github.com/platanus","followers_url":"https://api.github.com/users/platanus/followers","following_url":"https://api.github.com/users/platanus/following{/other_user}","gists_url":"https://api.github.com/users/platanus/gists{/gist_id}","starred_url":"https://api.github.com/users/platanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platanus/subscriptions","organizations_url":"https://api.github.com/users/platanus/orgs","repos_url":"https://api.github.com/users/platanus/repos","events_url":"https://api.github.com/users/platanus/events{/privacy}","received_events_url":"https://api.github.com/users/platanus/received_events","type":"Organization","site_admin":false},"repo":{"id":75084468,"name":"procef-billings","full_name":"platanus/procef-billings","owner":{"login":"platanus","id":1158740,"avatar_url":"https://avatars.githubusercontent.com/u/1158740?v=3","gravatar_id":"","url":"https://api.github.com/users/platanus","html_url":"https://github.com/platanus","followers_url":"https://api.github.com/users/platanus/followers","following_url":"https://api.github.com/users/platanus/following{/other_user}","gists_url":"https://api.github.com/users/platanus/gists{/gist_id}","starred_url":"https://api.github.com/users/platanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platanus/subscriptions","organizations_url":"https://api.github.com/users/platanus/orgs","repos_url":"https://api.github.com/users/platanus/repos","events_url":"https://api.github.com/users/platanus/events{/privacy}","received_events_url":"https://api.github.com/users/platanus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/platanus/procef-billings","description":null,"fork":false,"url":"https://api.github.com/repos/platanus/procef-billings","forks_url":"https://api.github.com/repos/platanus/procef-billings/forks","keys_url":"https://api.github.com/repos/platanus/procef-billings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/platanus/procef-billings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/platanus/procef-billings/teams","hooks_url":"https://api.github.com/repos/platanus/procef-billings/hooks","issue_events_url":"https://api.github.com/repos/platanus/procef-billings/issues/events{/number}","events_url":"https://api.github.com/repos/platanus/procef-billings/events","assignees_url":"https://api.github.com/repos/platanus/procef-billings/assignees{/user}","branches_url":"https://api.github.com/repos/platanus/procef-billings/branches{/branch}","tags_url":"https://api.github.com/repos/platanus/procef-billings/tags","blobs_url":"https://api.github.com/repos/platanus/procef-billings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/platanus/procef-billings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/platanus/procef-billings/git/refs{/sha}","trees_url":"https://api.github.com/repos/platanus/procef-billings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/platanus/procef-billings/statuses/{sha}","languages_url":"https://api.github.com/repos/platanus/procef-billings/languages","stargazers_url":"https://api.github.com/repos/platanus/procef-billings/stargazers","contributors_url":"https://api.github.com/repos/platanus/procef-billings/contributors","subscribers_url":"https://api.github.com/repos/platanus/procef-billings/subscribers","subscription_url":"https://api.github.com/repos/platanus/procef-billings/subscription","commits_url":"https://api.github.com/repos/platanus/procef-billings/commits{/sha}","git_commits_url":"https://api.github.com/repos/platanus/procef-billings/git/commits{/sha}","comments_url":"https://api.github.com/repos/platanus/procef-billings/comments{/number}","issue_comment_url":"https://api.github.com/repos/platanus/procef-billings/issues/comments{/number}","contents_url":"https://api.github.com/repos/platanus/procef-billings/contents/{+path}","compare_url":"https://api.github.com/repos/platanus/procef-billings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/platanus/procef-billings/merges","archive_url":"https://api.github.com/repos/platanus/procef-billings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/platanus/procef-billings/downloads","issues_url":"https://api.github.com/repos/platanus/procef-billings/issues{/number}","pulls_url":"https://api.github.com/repos/platanus/procef-billings/pulls{/number}","milestones_url":"https://api.github.com/repos/platanus/procef-billings/milestones{/number}","notifications_url":"https://api.github.com/repos/platanus/procef-billings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/platanus/procef-billings/labels{/name}","releases_url":"https://api.github.com/repos/platanus/procef-billings/releases{/id}","deployments_url":"https://api.github.com/repos/platanus/procef-billings/deployments","created_at":"2016-11-29T13:34:19Z","updated_at":"2016-11-29T13:34:41Z","pushed_at":"2016-12-07T18:46:53Z","git_url":"git://github.com/platanus/procef-billings.git","ssh_url":"git@github.com:platanus/procef-billings.git","clone_url":"https://github.com/platanus/procef-billings.git","svn_url":"https://github.com/platanus/procef-billings","homepage":null,"size":42,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"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":"platanus:master","ref":"master","sha":"9b17f51ef7c73667bf7182d3d4486456fd81d4ad","user":{"login":"platanus","id":1158740,"avatar_url":"https://avatars.githubusercontent.com/u/1158740?v=3","gravatar_id":"","url":"https://api.github.com/users/platanus","html_url":"https://github.com/platanus","followers_url":"https://api.github.com/users/platanus/followers","following_url":"https://api.github.com/users/platanus/following{/other_user}","gists_url":"https://api.github.com/users/platanus/gists{/gist_id}","starred_url":"https://api.github.com/users/platanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platanus/subscriptions","organizations_url":"https://api.github.com/users/platanus/orgs","repos_url":"https://api.github.com/users/platanus/repos","events_url":"https://api.github.com/users/platanus/events{/privacy}","received_events_url":"https://api.github.com/users/platanus/received_events","type":"Organization","site_admin":false},"repo":{"id":75084468,"name":"procef-billings","full_name":"platanus/procef-billings","owner":{"login":"platanus","id":1158740,"avatar_url":"https://avatars.githubusercontent.com/u/1158740?v=3","gravatar_id":"","url":"https://api.github.com/users/platanus","html_url":"https://github.com/platanus","followers_url":"https://api.github.com/users/platanus/followers","following_url":"https://api.github.com/users/platanus/following{/other_user}","gists_url":"https://api.github.com/users/platanus/gists{/gist_id}","starred_url":"https://api.github.com/users/platanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platanus/subscriptions","organizations_url":"https://api.github.com/users/platanus/orgs","repos_url":"https://api.github.com/users/platanus/repos","events_url":"https://api.github.com/users/platanus/events{/privacy}","received_events_url":"https://api.github.com/users/platanus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/platanus/procef-billings","description":null,"fork":false,"url":"https://api.github.com/repos/platanus/procef-billings","forks_url":"https://api.github.com/repos/platanus/procef-billings/forks","keys_url":"https://api.github.com/repos/platanus/procef-billings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/platanus/procef-billings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/platanus/procef-billings/teams","hooks_url":"https://api.github.com/repos/platanus/procef-billings/hooks","issue_events_url":"https://api.github.com/repos/platanus/procef-billings/issues/events{/number}","events_url":"https://api.github.com/repos/platanus/procef-billings/events","assignees_url":"https://api.github.com/repos/platanus/procef-billings/assignees{/user}","branches_url":"https://api.github.com/repos/platanus/procef-billings/branches{/branch}","tags_url":"https://api.github.com/repos/platanus/procef-billings/tags","blobs_url":"https://api.github.com/repos/platanus/procef-billings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/platanus/procef-billings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/platanus/procef-billings/git/refs{/sha}","trees_url":"https://api.github.com/repos/platanus/procef-billings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/platanus/procef-billings/statuses/{sha}","languages_url":"https://api.github.com/repos/platanus/procef-billings/languages","stargazers_url":"https://api.github.com/repos/platanus/procef-billings/stargazers","contributors_url":"https://api.github.com/repos/platanus/procef-billings/contributors","subscribers_url":"https://api.github.com/repos/platanus/procef-billings/subscribers","subscription_url":"https://api.github.com/repos/platanus/procef-billings/subscription","commits_url":"https://api.github.com/repos/platanus/procef-billings/commits{/sha}","git_commits_url":"https://api.github.com/repos/platanus/procef-billings/git/commits{/sha}","comments_url":"https://api.github.com/repos/platanus/procef-billings/comments{/number}","issue_comment_url":"https://api.github.com/repos/platanus/procef-billings/issues/comments{/number}","contents_url":"https://api.github.com/repos/platanus/procef-billings/contents/{+path}","compare_url":"https://api.github.com/repos/platanus/procef-billings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/platanus/procef-billings/merges","archive_url":"https://api.github.com/repos/platanus/procef-billings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/platanus/procef-billings/downloads","issues_url":"https://api.github.com/repos/platanus/procef-billings/issues{/number}","pulls_url":"https://api.github.com/repos/platanus/procef-billings/pulls{/number}","milestones_url":"https://api.github.com/repos/platanus/procef-billings/milestones{/number}","notifications_url":"https://api.github.com/repos/platanus/procef-billings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/platanus/procef-billings/labels{/name}","releases_url":"https://api.github.com/repos/platanus/procef-billings/releases{/id}","deployments_url":"https://api.github.com/repos/platanus/procef-billings/deployments","created_at":"2016-11-29T13:34:19Z","updated_at":"2016-11-29T13:34:41Z","pushed_at":"2016-12-07T18:46:53Z","git_url":"git://github.com/platanus/procef-billings.git","ssh_url":"git@github.com:platanus/procef-billings.git","clone_url":"https://github.com/platanus/procef-billings.git","svn_url":"https://github.com/platanus/procef-billings","homepage":null,"size":42,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"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/platanus/procef-billings/pulls/2"},"html":{"href":"https://github.com/platanus/procef-billings/pull/2"},"issue":{"href":"https://api.github.com/repos/platanus/procef-billings/issues/2"},"comments":{"href":"https://api.github.com/repos/platanus/procef-billings/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/platanus/procef-billings/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/platanus/procef-billings/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/platanus/procef-billings/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/platanus/procef-billings/statuses/4f5bee20c1113723f3379434ef069084559948c4"}}}}
{"actor":{"display_login":"ldlsegovia"}}