Skip to content

Commit 577c05e

Browse files
committed
Merge branch 'dietary-restrictions' of github.com:mikej/codebar-planner into dietary-restrictions
2 parents 15c05a4 + 53781a9 commit 577c05e

File tree

14 files changed

+46
-29
lines changed

14 files changed

+46
-29
lines changed

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,5 @@ group :production do
117117
end
118118

119119
gem 'rollbar'
120-
gem 'skylight'
121120

122121
gem "carrierwave-aws", "~> 1.6"

Gemfile.lock

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,6 @@ GEM
479479
simplecov-html (0.12.3)
480480
simplecov-lcov (0.8.0)
481481
simplecov_json_formatter (0.1.4)
482-
skylight (6.0.4)
483-
activesupport (>= 5.2.0)
484482
slop (3.6.0)
485483
snaky_hash (2.0.1)
486484
hashie
@@ -607,7 +605,6 @@ DEPENDENCIES
607605
simple_form
608606
simplecov
609607
simplecov-lcov
610-
skylight
611608
sprockets-rails
612609
stimulus-rails
613610
stripe

app/controllers/admin/announcements_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
class Admin::AnnouncementsController < Admin::ApplicationController
1+
class Admin::AnnouncementsController < SuperAdmin::ApplicationController
22
before_action :set_announcement, only: %i[update edit]
33

44
def index

app/models/workshop.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,8 @@ class Workshop < ApplicationRecord
3030
before_validation :set_date_and_time, :set_end_date_and_time, if: proc { |model| model.chapter_id.present? }
3131
before_validation :set_opens_at
3232

33-
def workshop_sponsors_with_host_true
34-
Workshop.includes(:workshop_sponsors).flat_map do |workshop|
35-
workshop.workshop_sponsors.select { |ws| ws.host == true && ws.workshop_id == id }
36-
end
37-
end
38-
3933
def host
40-
workshop_sponsors_with_host_true.first&.sponsor
34+
WorkshopSponsor.hosts.for_workshop(id).first&.sponsor
4135
end
4236

4337
def waiting_list

app/models/workshop_sponsor.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ class WorkshopSponsor < ApplicationRecord
33
belongs_to :workshop
44

55
validates :sponsor_id, uniqueness: { scope: :workshop_id, message: :already_sponsoring }
6+
7+
scope :hosts, -> { where('workshop_sponsors.host = ?', true) }
8+
scope :for_workshop, ->(workshop_id) { where('workshop_sponsors.workshop_id = ?', workshop_id) }
69
end

config/application.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ class Application < Rails::Application
5353
# Related to https://stackoverflow.com/questions/72970170/upgrading-to-rails-6-1-6-1-causes-psychdisallowedclass-tried-to-load-unspecif
5454
# and https://discuss.rubyonrails.org/t/cve-2022-32224-possible-rce-escalation-bug-with-serialized-columns-in-active-record/81017
5555
config.active_record.yaml_column_permitted_classes = [Symbol, Date, Time, ActiveSupport::TimeWithZone, ActiveSupport::TimeZone, ActiveSupport::HashWithIndifferentAccess]
56-
# Allow Skylight to show insights from local development.
57-
# More info at https://skylight.io/support/environments
58-
config.skylight.environments << 'development'
5956

6057
config.active_record.belongs_to_required_by_default = true
6158
end

config/locales/en.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ en:
8282
homepage:
8383
title: Homepage
8484
intro: "<strong>codebar</strong> is a charity that facilitates the growth of a diverse tech community by running free regular programming workshops for minority groups in tech."
85-
explanation: "Our goal is to enable minority group members to learn programming in a safe and collaborative environment and expand their career opportunities. To achieve this we run free regular workshops, regular one-off events and try to create opportunities for our students making technology and coding more accessible."
85+
explanation: "Our goal is to enable people from underrepresented groups to learn programming in a safe and collaborative environment and expand their career opportunities. To achieve this we run free regular workshops, regular one-off events and try to create opportunities for our students making technology and coding more accessible."
8686
participate:
8787
students_title: "Students"
8888
students_explanation_p1: "Our students come from diverse backgrounds—some aspiring to become full-time developers, while others simply want to learn the basics of coding in a supportive environment."
@@ -339,7 +339,7 @@ en:
339339
new:
340340
intro_html: "We provide a welcoming, inclusive, and supportive learning environment, with a strict zero-tolerance policy for any form of harassment or inappropriate behavior. Please take a moment to review our <a href='%{link}'>code of conduct</a> before signing up."
341341
students:
342-
intro_html: "If you’re interested in attending as a student, be sure to check our <a href='%{link}'>eligibility criteria</a>. Our workshops and events are exclusively for women, non-binary, LGBTQ+ members, and people from underrepresented minority groups."
342+
intro_html: "If you’re interested in attending as a student, be sure to check our <a href='%{link}'>eligibility criteria</a>. Our workshops and events are exclusively for women, non-binary, LGBTQ+ members, and people from underrepresented groups."
343343
github: "When you click the sign-up button, you'll be redirected to GitHub. After logging in with your GitHub account, you'll return to the codebar website. If you don’t have an account yet, creating one is quick and easy—and it will be useful as you begin your coding journey!"
344344
invitations: "Invitations are sent out periodically, so don't worry if you don't receive one as soon as you register."
345345
terms_and_conditions:

config/locales/en_AU.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ en-AU:
4848
format: '%u%n'
4949
homepage:
5050
intro: "<strong>codebar</strong> is a charity that facilitates the growth of a diverse tech community by running free regular programming workshops for minority groups in tech."
51-
explanation: "Our goal is to enable minority group members to learn programming in a safe and collaborative environment and expand their career opportunities. To achieve this we run free regular workshops, regular one-off events and try to create opportunities for our students making technology and coding more accessible."
51+
explanation: "Our goal is to enable people from underrepresented groups to learn programming in a safe and collaborative environment and expand their career opportunities. To achieve this we run free regular workshops, regular one-off events and try to create opportunities for our students making technology and coding more accessible."
5252
participate:
5353
students_title: "Students"
5454
students_explanation_p1: "Our students come from diverse backgrounds—some aspiring to become full-time developers, while others simply want to learn the basics of coding in a supportive environment."
@@ -228,7 +228,7 @@ en-AU:
228228
new:
229229
intro_html: "We provide a welcoming, inclusive, and supportive learning environment, with a strict zero-tolerance policy for any form of harassment or inappropriate behavior. Please take a moment to review our <a href='%{link}'>code of conduct</a> before signing up."
230230
students:
231-
intro_html: "If you’re interested in attending as a student, be sure to check our <a href='%{link}'>eligibility criteria</a>. Our workshops and events are exclusively for women, non-binary, LGBTQ+ members, and people from underrepresented minority groups."
231+
intro_html: "If you’re interested in attending as a student, be sure to check our <a href='%{link}'>eligibility criteria</a>. Our workshops and events are exclusively for women, non-binary, LGBTQ+ members, and people from underrepresented groups."
232232
github: "When you click the sign-up button, you'll be redirected to GitHub. After logging in with your GitHub account, you'll return to the codebar website. If you don’t have an account yet, creating one is quick and easy—and it will be useful as you begin your coding journey!"
233233
invitations: "Invitations are sent out periodically, so don't worry if you don't receive one as soon as you register."
234234
footer:

config/locales/en_GB.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ en-GB:
4747
precision: 0
4848
format: '%u%n'
4949
homepage:
50-
intro: "<strong>codebar</strong> is a charity that facilitates the growth of a diverse tech community by running free regular programming workshops for minority groups in tech."
51-
explanation: "Our goal is to enable minority group members to learn programming in a safe and collaborative environment and expand their career opportunities. To achieve this we run free regular workshops, regular one-off events and try to create opportunities for our students making technology and coding more accessible."
50+
intro: "<strong>codebar</strong> is a charity that facilitates the growth of a diverse tech community by running free regular programming workshops for underrepresented groups in tech."
51+
explanation: "Our goal is to enable people from underrepresented groups to learn programming in a safe and collaborative environment and expand their career opportunities. To achieve this we run free regular workshops, regular one-off events and try to create opportunities for our students making technology and coding more accessible."
5252
participate:
5353
students_title: "Students"
5454
students_explanation_p1: "Our students come from diverse backgrounds—some aspiring to become full-time developers, while others simply want to learn the basics of coding in a supportive environment."
@@ -228,7 +228,7 @@ en-GB:
228228
new:
229229
intro_html: "We provide a welcoming, inclusive, and supportive learning environment, with a strict zero-tolerance policy for any form of harassment or inappropriate behavior. Please take a moment to review our <a href='%{link}'>code of conduct</a> before signing up."
230230
students:
231-
intro_html: "If you’re interested in attending as a student, be sure to check our <a href='%{link}'>eligibility criteria</a>. Our workshops and events are exclusively for women, non-binary, LGBTQ+ members, and people from underrepresented minority groups."
231+
intro_html: "If you’re interested in attending as a student, be sure to check our <a href='%{link}'>eligibility criteria</a>. Our workshops and events are exclusively for women, non-binary, LGBTQ+ members, and people from underrepresented groups."
232232
github: "When you click the sign-up button, you'll be redirected to GitHub. After logging in with your GitHub account, you'll return to the codebar website. If you don’t have an account yet, creating one is quick and easy—and it will be useful as you begin your coding journey!"
233233
invitations: "Invitations are sent out periodically, so don't worry if you don't receive one as soon as you register."
234234
footer:

config/locales/en_US.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ en-US:
4848
format: '%u%n'
4949
homepage:
5050
intro: "<strong>codebar</strong> is a charity that facilitates the growth of a diverse tech community by running free regular programming workshops for minority groups in tech."
51-
explanation: "Our goal is to enable minority group members to learn programming in a safe and collaborative environment and expand their career opportunities. To achieve this we run free regular workshops, regular one-off events and try to create opportunities for our students making technology and coding more accessible."
51+
explanation: "Our goal is to enable people from underrepresented groups to learn programming in a safe and collaborative environment and expand their career opportunities. To achieve this we run free regular workshops, regular one-off events and try to create opportunities for our students making technology and coding more accessible."
5252
participate:
5353
students_title: "Students"
5454
students_explanation_p1: "Our students come from diverse backgrounds—some aspiring to become full-time developers, while others simply want to learn the basics of coding in a supportive environment."
@@ -226,7 +226,7 @@ en-US:
226226
new:
227227
intro_html: "We provide a welcoming, inclusive, and supportive learning environment, with a strict zero-tolerance policy for any form of harassment or inappropriate behavior. Please take a moment to review our <a href='%{link}'>code of conduct</a> before signing up."
228228
students:
229-
intro_html: "If you’re interested in attending as a student, be sure to check our <a href='%{link}'>eligibility criteria</a>. Our workshops and events are exclusively for women, non-binary, LGBTQ+ members, and people from underrepresented minority groups."
229+
intro_html: "If you’re interested in attending as a student, be sure to check our <a href='%{link}'>eligibility criteria</a>. Our workshops and events are exclusively for women, non-binary, LGBTQ+ members, and people from underrepresented groups."
230230
github: "When you click the sign-up button, you'll be redirected to GitHub. After logging in with your GitHub account, you'll return to the codebar website. If you don’t have an account yet, creating one is quick and easy—and it will be useful as you begin your coding journey!"
231231
invitations: "Invitations are sent out periodically, so don't worry if you don't receive one as soon as you register."
232232
footer:

0 commit comments

Comments
 (0)