{"action":"created","comment":{"url":"https://api.github.com/repos/openSUSE/osem/pulls/comments/73854721","id":73854721,"diff_hunk":"@@ -13,20 +13,28 @@ def update\n       @program.assign_attributes(program_params)\n       send_mail_on_schedule_public = @program.notify_on_schedule_public?\n \n-      if @program.update_attributes(program_params)\n-        ConferenceScheduleUpdateMailJob.perform_later(@conference) if send_mail_on_schedule_public\n-        redirect_to admin_conference_program_path(@conference.short_title),\n-                    notice: 'The program was successfully updated.'\n-      else\n-        flash[:error] = \"Updating program failed. #{@program.errors.to_a.join('. ')}.\"\n-        render :new\n+      respond_to do |format|\n+        if @program.update_attributes(program_params)\n+          ConferenceScheduleUpdateMailJob.perform_later(@conference) if send_mail_on_schedule_public\n+          format.html do","path":"app/controllers/admin/programs_controller.rb","position":14,"original_position":14,"commit_id":"b80791707c53e27cc56a6b87646e60b3fe6947bf","original_commit_id":"b80791707c53e27cc56a6b87646e60b3fe6947bf","user":{"login":"ChrisBr","id":3799140,"avatar_url":"https://avatars.githubusercontent.com/u/3799140?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisBr","html_url":"https://github.com/ChrisBr","followers_url":"https://api.github.com/users/ChrisBr/followers","following_url":"https://api.github.com/users/ChrisBr/following{/other_user}","gists_url":"https://api.github.com/users/ChrisBr/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisBr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisBr/subscriptions","organizations_url":"https://api.github.com/users/ChrisBr/orgs","repos_url":"https://api.github.com/users/ChrisBr/repos","events_url":"https://api.github.com/users/ChrisBr/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisBr/received_events","type":"User","site_admin":false},"body":"I would prefer to have two respond_to blocks to be more explicit and to not wrap the whole update statement inside it!","created_at":"2016-08-08T10:37:25Z","updated_at":"2016-08-08T10:37:25Z","html_url":"https://github.com/openSUSE/osem/pull/1094#discussion_r73854721","pull_request_url":"https://api.github.com/repos/openSUSE/osem/pulls/1094","_links":{"self":{"href":"https://api.github.com/repos/openSUSE/osem/pulls/comments/73854721"},"html":{"href":"https://github.com/openSUSE/osem/pull/1094#discussion_r73854721"},"pull_request":{"href":"https://api.github.com/repos/openSUSE/osem/pulls/1094"}}},"pull_request":{"url":"https://api.github.com/repos/openSUSE/osem/pulls/1094","id":76744778,"html_url":"https://github.com/openSUSE/osem/pull/1094","diff_url":"https://github.com/openSUSE/osem/pull/1094.diff","patch_url":"https://github.com/openSUSE/osem/pull/1094.patch","issue_url":"https://api.github.com/repos/openSUSE/osem/issues/1094","number":1094,"state":"open","locked":false,"title":"Schedule versioning","user":{"login":"Ana06","id":16052290,"avatar_url":"https://avatars.githubusercontent.com/u/16052290?v=3","gravatar_id":"","url":"https://api.github.com/users/Ana06","html_url":"https://github.com/Ana06","followers_url":"https://api.github.com/users/Ana06/followers","following_url":"https://api.github.com/users/Ana06/following{/other_user}","gists_url":"https://api.github.com/users/Ana06/gists{/gist_id}","starred_url":"https://api.github.com/users/Ana06/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ana06/subscriptions","organizations_url":"https://api.github.com/users/Ana06/orgs","repos_url":"https://api.github.com/users/Ana06/repos","events_url":"https://api.github.com/users/Ana06/events{/privacy}","received_events_url":"https://api.github.com/users/Ana06/received_events","type":"User","site_admin":false},"body":"**Organizers can create multiple proposals for schedules in the backend, only 1 schedule can be selected and that's the conference schedule.**\r\n\r\nI have created the new associations and models needed for the schedule versioning, illustrated in the following image:\r\n\r\n![nuevodocumento 5_1](https://cloud.githubusercontent.com/assets/16052290/16687181/424bd6e8-4517-11e6-81b6-6898df351463.jpg)\r\n\r\nThe `Schedule` and `EventSchedule` models are new. `EventSchedule` is where the time and room is saved. So, for every `Schedule` and `Event` we can have one `EventSchedule `allowing that an Event is scheduled in different rooms and times for every schedule.\r\n\r\nAlso, the `selected_schedule` in program indicates what of the schedules that belongs to that program is the public one.\r\n","created_at":"2016-07-08T12:24:59Z","updated_at":"2016-08-08T10:37:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"032a9f2410f99ee869651553c8d522019713320f","assignee":{"login":"ChrisBr","id":3799140,"avatar_url":"https://avatars.githubusercontent.com/u/3799140?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisBr","html_url":"https://github.com/ChrisBr","followers_url":"https://api.github.com/users/ChrisBr/followers","following_url":"https://api.github.com/users/ChrisBr/following{/other_user}","gists_url":"https://api.github.com/users/ChrisBr/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisBr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisBr/subscriptions","organizations_url":"https://api.github.com/users/ChrisBr/orgs","repos_url":"https://api.github.com/users/ChrisBr/repos","events_url":"https://api.github.com/users/ChrisBr/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisBr/received_events","type":"User","site_admin":false},"assignees":[{"login":"ChrisBr","id":3799140,"avatar_url":"https://avatars.githubusercontent.com/u/3799140?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisBr","html_url":"https://github.com/ChrisBr","followers_url":"https://api.github.com/users/ChrisBr/followers","following_url":"https://api.github.com/users/ChrisBr/following{/other_user}","gists_url":"https://api.github.com/users/ChrisBr/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisBr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisBr/subscriptions","organizations_url":"https://api.github.com/users/ChrisBr/orgs","repos_url":"https://api.github.com/users/ChrisBr/repos","events_url":"https://api.github.com/users/ChrisBr/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisBr/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/openSUSE/osem/pulls/1094/commits","review_comments_url":"https://api.github.com/repos/openSUSE/osem/pulls/1094/comments","review_comment_url":"https://api.github.com/repos/openSUSE/osem/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openSUSE/osem/issues/1094/comments","statuses_url":"https://api.github.com/repos/openSUSE/osem/statuses/b80791707c53e27cc56a6b87646e60b3fe6947bf","head":{"label":"Ana06:schedule-versioning","ref":"schedule-versioning","sha":"b80791707c53e27cc56a6b87646e60b3fe6947bf","user":{"login":"Ana06","id":16052290,"avatar_url":"https://avatars.githubusercontent.com/u/16052290?v=3","gravatar_id":"","url":"https://api.github.com/users/Ana06","html_url":"https://github.com/Ana06","followers_url":"https://api.github.com/users/Ana06/followers","following_url":"https://api.github.com/users/Ana06/following{/other_user}","gists_url":"https://api.github.com/users/Ana06/gists{/gist_id}","starred_url":"https://api.github.com/users/Ana06/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ana06/subscriptions","organizations_url":"https://api.github.com/users/Ana06/orgs","repos_url":"https://api.github.com/users/Ana06/repos","events_url":"https://api.github.com/users/Ana06/events{/privacy}","received_events_url":"https://api.github.com/users/Ana06/received_events","type":"User","site_admin":false},"repo":{"id":53534728,"name":"osem","full_name":"Ana06/osem","owner":{"login":"Ana06","id":16052290,"avatar_url":"https://avatars.githubusercontent.com/u/16052290?v=3","gravatar_id":"","url":"https://api.github.com/users/Ana06","html_url":"https://github.com/Ana06","followers_url":"https://api.github.com/users/Ana06/followers","following_url":"https://api.github.com/users/Ana06/following{/other_user}","gists_url":"https://api.github.com/users/Ana06/gists{/gist_id}","starred_url":"https://api.github.com/users/Ana06/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ana06/subscriptions","organizations_url":"https://api.github.com/users/Ana06/orgs","repos_url":"https://api.github.com/users/Ana06/repos","events_url":"https://api.github.com/users/Ana06/events{/privacy}","received_events_url":"https://api.github.com/users/Ana06/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Ana06/osem","description":"Open Source Event Manager. An event management tool tailored to Free and Open Source Software conferences.","fork":true,"url":"https://api.github.com/repos/Ana06/osem","forks_url":"https://api.github.com/repos/Ana06/osem/forks","keys_url":"https://api.github.com/repos/Ana06/osem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ana06/osem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ana06/osem/teams","hooks_url":"https://api.github.com/repos/Ana06/osem/hooks","issue_events_url":"https://api.github.com/repos/Ana06/osem/issues/events{/number}","events_url":"https://api.github.com/repos/Ana06/osem/events","assignees_url":"https://api.github.com/repos/Ana06/osem/assignees{/user}","branches_url":"https://api.github.com/repos/Ana06/osem/branches{/branch}","tags_url":"https://api.github.com/repos/Ana06/osem/tags","blobs_url":"https://api.github.com/repos/Ana06/osem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ana06/osem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ana06/osem/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ana06/osem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ana06/osem/statuses/{sha}","languages_url":"https://api.github.com/repos/Ana06/osem/languages","stargazers_url":"https://api.github.com/repos/Ana06/osem/stargazers","contributors_url":"https://api.github.com/repos/Ana06/osem/contributors","subscribers_url":"https://api.github.com/repos/Ana06/osem/subscribers","subscription_url":"https://api.github.com/repos/Ana06/osem/subscription","commits_url":"https://api.github.com/repos/Ana06/osem/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ana06/osem/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ana06/osem/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ana06/osem/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ana06/osem/contents/{+path}","compare_url":"https://api.github.com/repos/Ana06/osem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ana06/osem/merges","archive_url":"https://api.github.com/repos/Ana06/osem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ana06/osem/downloads","issues_url":"https://api.github.com/repos/Ana06/osem/issues{/number}","pulls_url":"https://api.github.com/repos/Ana06/osem/pulls{/number}","milestones_url":"https://api.github.com/repos/Ana06/osem/milestones{/number}","notifications_url":"https://api.github.com/repos/Ana06/osem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ana06/osem/labels{/name}","releases_url":"https://api.github.com/repos/Ana06/osem/releases{/id}","deployments_url":"https://api.github.com/repos/Ana06/osem/deployments","created_at":"2016-03-09T21:55:32Z","updated_at":"2016-03-09T21:55:56Z","pushed_at":"2016-08-07T19:51:07Z","git_url":"git://github.com/Ana06/osem.git","ssh_url":"git@github.com:Ana06/osem.git","clone_url":"https://github.com/Ana06/osem.git","svn_url":"https://github.com/Ana06/osem","homepage":"http://osem.io","size":22236,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"openSUSE:master","ref":"master","sha":"96155eb87f98c5c7331220495edf98e5bbd7847c","user":{"login":"openSUSE","id":623819,"avatar_url":"https://avatars.githubusercontent.com/u/623819?v=3","gravatar_id":"","url":"https://api.github.com/users/openSUSE","html_url":"https://github.com/openSUSE","followers_url":"https://api.github.com/users/openSUSE/followers","following_url":"https://api.github.com/users/openSUSE/following{/other_user}","gists_url":"https://api.github.com/users/openSUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/openSUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openSUSE/subscriptions","organizations_url":"https://api.github.com/users/openSUSE/orgs","repos_url":"https://api.github.com/users/openSUSE/repos","events_url":"https://api.github.com/users/openSUSE/events{/privacy}","received_events_url":"https://api.github.com/users/openSUSE/received_events","type":"Organization","site_admin":false},"repo":{"id":5911225,"name":"osem","full_name":"openSUSE/osem","owner":{"login":"openSUSE","id":623819,"avatar_url":"https://avatars.githubusercontent.com/u/623819?v=3","gravatar_id":"","url":"https://api.github.com/users/openSUSE","html_url":"https://github.com/openSUSE","followers_url":"https://api.github.com/users/openSUSE/followers","following_url":"https://api.github.com/users/openSUSE/following{/other_user}","gists_url":"https://api.github.com/users/openSUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/openSUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openSUSE/subscriptions","organizations_url":"https://api.github.com/users/openSUSE/orgs","repos_url":"https://api.github.com/users/openSUSE/repos","events_url":"https://api.github.com/users/openSUSE/events{/privacy}","received_events_url":"https://api.github.com/users/openSUSE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openSUSE/osem","description":"Open Source Event Manager. An event management tool tailored to Free and Open Source Software conferences.","fork":false,"url":"https://api.github.com/repos/openSUSE/osem","forks_url":"https://api.github.com/repos/openSUSE/osem/forks","keys_url":"https://api.github.com/repos/openSUSE/osem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openSUSE/osem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openSUSE/osem/teams","hooks_url":"https://api.github.com/repos/openSUSE/osem/hooks","issue_events_url":"https://api.github.com/repos/openSUSE/osem/issues/events{/number}","events_url":"https://api.github.com/repos/openSUSE/osem/events","assignees_url":"https://api.github.com/repos/openSUSE/osem/assignees{/user}","branches_url":"https://api.github.com/repos/openSUSE/osem/branches{/branch}","tags_url":"https://api.github.com/repos/openSUSE/osem/tags","blobs_url":"https://api.github.com/repos/openSUSE/osem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openSUSE/osem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openSUSE/osem/git/refs{/sha}","trees_url":"https://api.github.com/repos/openSUSE/osem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openSUSE/osem/statuses/{sha}","languages_url":"https://api.github.com/repos/openSUSE/osem/languages","stargazers_url":"https://api.github.com/repos/openSUSE/osem/stargazers","contributors_url":"https://api.github.com/repos/openSUSE/osem/contributors","subscribers_url":"https://api.github.com/repos/openSUSE/osem/subscribers","subscription_url":"https://api.github.com/repos/openSUSE/osem/subscription","commits_url":"https://api.github.com/repos/openSUSE/osem/commits{/sha}","git_commits_url":"https://api.github.com/repos/openSUSE/osem/git/commits{/sha}","comments_url":"https://api.github.com/repos/openSUSE/osem/comments{/number}","issue_comment_url":"https://api.github.com/repos/openSUSE/osem/issues/comments{/number}","contents_url":"https://api.github.com/repos/openSUSE/osem/contents/{+path}","compare_url":"https://api.github.com/repos/openSUSE/osem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openSUSE/osem/merges","archive_url":"https://api.github.com/repos/openSUSE/osem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openSUSE/osem/downloads","issues_url":"https://api.github.com/repos/openSUSE/osem/issues{/number}","pulls_url":"https://api.github.com/repos/openSUSE/osem/pulls{/number}","milestones_url":"https://api.github.com/repos/openSUSE/osem/milestones{/number}","notifications_url":"https://api.github.com/repos/openSUSE/osem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openSUSE/osem/labels{/name}","releases_url":"https://api.github.com/repos/openSUSE/osem/releases{/id}","deployments_url":"https://api.github.com/repos/openSUSE/osem/deployments","created_at":"2012-09-22T07:40:18Z","updated_at":"2016-08-07T12:09:36Z","pushed_at":"2016-08-07T20:10:04Z","git_url":"git://github.com/openSUSE/osem.git","ssh_url":"git@github.com:openSUSE/osem.git","clone_url":"https://github.com/openSUSE/osem.git","svn_url":"https://github.com/openSUSE/osem","homepage":"http://osem.io","size":39801,"stargazers_count":164,"watchers_count":164,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":117,"mirror_url":null,"open_issues_count":121,"forks":117,"open_issues":121,"watchers":164,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openSUSE/osem/pulls/1094"},"html":{"href":"https://github.com/openSUSE/osem/pull/1094"},"issue":{"href":"https://api.github.com/repos/openSUSE/osem/issues/1094"},"comments":{"href":"https://api.github.com/repos/openSUSE/osem/issues/1094/comments"},"review_comments":{"href":"https://api.github.com/repos/openSUSE/osem/pulls/1094/comments"},"review_comment":{"href":"https://api.github.com/repos/openSUSE/osem/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openSUSE/osem/pulls/1094/commits"},"statuses":{"href":"https://api.github.com/repos/openSUSE/osem/statuses/b80791707c53e27cc56a6b87646e60b3fe6947bf"}}}}
{"actor":{"display_login":"ChrisBr"}}