{"action":"created","comment":{"url":"https://api.github.com/repos/openSUSE/osem/pulls/comments/73322522","id":73322522,"diff_hunk":"@@ -0,0 +1,47 @@\n+module Admin\n+  class EventScheduleController < Admin::BaseController\n+    load_and_authorize_resource :event_schedule\n+\n+    def create\n+      event_schedule = EventSchedule.create(get_event_schedule_params(params))\n+      render json: { 'status' => 'ok', event_schedule_id: event_schedule.id }\n+    end\n+\n+    def update\n+      @event_schedule.update(get_event_schedule_params(params))\n+      render json: { 'status' => 'ok', event_schedule_id: @event_schedule.id }\n+    end\n+\n+    def destroy\n+      @event_schedule.destroy if @event_schedule\n+      render json: { 'status' => 'ok' }\n+    end\n+\n+    private\n+\n+    def get_event_schedule_params(params)\n+      error_message = nil\n+\n+      event = Event.where(guid: params[:event]).first\n+      error_message = \"Could not find event GUID: #{params[:event]}\" if event.nil?\n+\n+      schedule = Schedule.where(id: params[:schedule]).first\n+      error_message = \"Could not find schedule: #{params[:schedule]}\" if schedule.nil?\n+\n+      room = Room.where(guid: params[:room]).first\n+      error_message = \"Could not find room GUID: #{params[:room]}\" if room.nil?\n+\n+      error_message = 'Date and time must be present' if params[:date].eql?('') || params[:time].eql?('')","path":"app/controllers/admin/event_schedule_controller.rb","position":34,"original_position":34,"commit_id":"1d820f915a36959f5c180cf2318306f16fef796c","original_commit_id":"1d820f915a36959f5c180cf2318306f16fef796c","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":"All this looks like validations for me?!","created_at":"2016-08-03T11:32:36Z","updated_at":"2016-08-03T11:32:36Z","html_url":"https://github.com/openSUSE/osem/pull/1094#discussion_r73322522","pull_request_url":"https://api.github.com/repos/openSUSE/osem/pulls/1094","_links":{"self":{"href":"https://api.github.com/repos/openSUSE/osem/pulls/comments/73322522"},"html":{"href":"https://github.com/openSUSE/osem/pull/1094#discussion_r73322522"},"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":"I have created the new associations and models needed for the schedule versioning.\r\n\r\n![nuevodocumento 5_1](https://cloud.githubusercontent.com/assets/16052290/16687181/424bd6e8-4517-11e6-81b6-6898df351463.jpg)\r\n\r\n\r\nI haven't adapted the User Interface to make use of the introduced associations and models yet as I need that we merge #1032 before. And to merge #1032 we need to merge #1082.\r\n\r\nI hadn't touch the backend neither because I am not sure if I should adapt what we have now to the new associations and models or if I should start to change the backend. I think that changing the backend would be better although the PR would be bigger.","created_at":"2016-07-08T12:24:59Z","updated_at":"2016-08-03T11:32:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7139164efd7ed61b3e4c9b78f38403b0b68eb2d0","assignee":null,"assignees":[],"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/1d820f915a36959f5c180cf2318306f16fef796c","head":{"label":"Ana06:schedule-versioning","ref":"schedule-versioning","sha":"1d820f915a36959f5c180cf2318306f16fef796c","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-03T11:16:54Z","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":22223,"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-07-30T21:46:05Z","pushed_at":"2016-08-03T11:16:55Z","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":161,"watchers_count":161,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":116,"mirror_url":null,"open_issues_count":116,"forks":116,"open_issues":116,"watchers":161,"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/1d820f915a36959f5c180cf2318306f16fef796c"}}}}
{"actor":{"display_login":"ChrisBr"}}