{"action":"created","issue":{"url":"https://api.github.com/repos/thewca/worldcubeassociation.org/issues/926","repository_url":"https://api.github.com/repos/thewca/worldcubeassociation.org","labels_url":"https://api.github.com/repos/thewca/worldcubeassociation.org/issues/926/labels{/name}","comments_url":"https://api.github.com/repos/thewca/worldcubeassociation.org/issues/926/comments","events_url":"https://api.github.com/repos/thewca/worldcubeassociation.org/issues/926/events","html_url":"https://github.com/thewca/worldcubeassociation.org/pull/926","id":180479936,"number":926,"title":"When removing a competition event, also delete any registrations for that event.","user":{"login":"jfly","id":277474,"avatar_url":"https://avatars.githubusercontent.com/u/277474?v=3","gravatar_id":"","url":"https://api.github.com/users/jfly","html_url":"https://github.com/jfly","followers_url":"https://api.github.com/users/jfly/followers","following_url":"https://api.github.com/users/jfly/following{/other_user}","gists_url":"https://api.github.com/users/jfly/gists{/gist_id}","starred_url":"https://api.github.com/users/jfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfly/subscriptions","organizations_url":"https://api.github.com/users/jfly/orgs","repos_url":"https://api.github.com/users/jfly/repos","events_url":"https://api.github.com/users/jfly/events{/privacy}","received_events_url":"https://api.github.com/users/jfly/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-01T20:59:20Z","updated_at":"2016-10-03T15:25:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/thewca/worldcubeassociation.org/pulls/926","html_url":"https://github.com/thewca/worldcubeassociation.org/pull/926","diff_url":"https://github.com/thewca/worldcubeassociation.org/pull/926.diff","patch_url":"https://github.com/thewca/worldcubeassociation.org/pull/926.patch"},"body":"(This fixes #377)\r\n\r\nThis was possible thanks to @pingskills's work in #894 to get rid of the `eventSpecs` column.\r\n\r\n- I had to tweak our schema a bit to get this working. Right now, we have a `registration_events` table which joins `Registrations` with their events. However, I believe this makes it hard/impossible to associate `competition_events` with `registration_events` and add the `dependent: :destroy` we need. So, I added a migration to change our `registration_events` table to a `registration_competition_events` table. This feels like the right direction to go to me, although it did force me to add some hackiness to our `_associated_events_picker.html.erb`.\r\n- I've created #925 to add a warning when people remove an event that has people registered for it. Is anyone opposed to merge this PR up without implementing #925?"},"comment":{"url":"https://api.github.com/repos/thewca/worldcubeassociation.org/issues/comments/251137012","html_url":"https://github.com/thewca/worldcubeassociation.org/pull/926#issuecomment-251137012","issue_url":"https://api.github.com/repos/thewca/worldcubeassociation.org/issues/926","id":251137012,"user":{"login":"larspetrus","id":755243,"avatar_url":"https://avatars.githubusercontent.com/u/755243?v=3","gravatar_id":"","url":"https://api.github.com/users/larspetrus","html_url":"https://github.com/larspetrus","followers_url":"https://api.github.com/users/larspetrus/followers","following_url":"https://api.github.com/users/larspetrus/following{/other_user}","gists_url":"https://api.github.com/users/larspetrus/gists{/gist_id}","starred_url":"https://api.github.com/users/larspetrus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larspetrus/subscriptions","organizations_url":"https://api.github.com/users/larspetrus/orgs","repos_url":"https://api.github.com/users/larspetrus/repos","events_url":"https://api.github.com/users/larspetrus/events{/privacy}","received_events_url":"https://api.github.com/users/larspetrus/received_events","type":"User","site_admin":false},"created_at":"2016-10-03T15:25:02Z","updated_at":"2016-10-03T15:25:02Z","body":"I get stuck on the name `RegistrationCompetitionEvent`. I can't parse that in any way that makes sense. \r\n\r\nWhat actually _is_ a RegistrationCompetitionEvent? Can we come up with a better name?\r\n\r\nI feel bad for not putting in the time to learn what an RCE _is_, and offering a name suggestion, but this is not the day for such things."}}
{"actor":{"display_login":"larspetrus"}}