Skip to content

Commit 5a19c59

Browse files
committed
Implement changes to the attendee application form
1 parent 783e74e commit 5a19c59

File tree

4 files changed

+26
-7
lines changed

4 files changed

+26
-7
lines changed

app/controllers/applications_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def new
1616
def create
1717
@application = @event.applications.build(params.require(:application).permit(:name,
1818
:email, :language_de, :language_en, :attended_before, :rejected_before, :level,
19-
:comments, :os, :needs_computer, :read_coc, :female))
19+
:comments, :referred_by, :os, :needs_computer, :read_coc, :female))
2020

2121
@application.random_id = SecureRandom.hex(12)
2222
@application.sequence_number = @event.applications.count + 1

app/views/applications/new.html.erb

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
<%= error_message(@application, :female) %>
1212
<p>
1313
<%= f.check_box :female %>
14-
<%= f.label(:female, "I am a woman / non-binary person.") %>
14+
<%= f.label(:female, "I identify as a woman (cis or trans) or non-binary person or trans-man.") %>
15+
<p class="note">
16+
This workshop is only for women, non-binary and trans-people.
17+
Feel free to leave a comment at the bottom of the form, if this line is problematic for you.
18+
</p>
1519
</p>
1620
<p><%= f.label(:name, "Name") %></p><p class="note">No official name necessary, you can use the name you want to be called. Just be sure to remember what you picked. *</p>
1721
<%= error_message(@application, :name) %>
@@ -37,7 +41,7 @@
3741
<fieldset>
3842
<p>
3943
<%= f.check_box :attended_before %>
40-
<%= f.label(:attended_before, "I have attended a code curious workshop before.") %>
44+
<%= f.label(:attended_before, "I have attended a code curious or Rails Girls Berlin workshop before.") %>
4145
</p>
4246
<p>
4347
<%= f.check_box :rejected_before %>
@@ -52,10 +56,19 @@
5256
<p><%= f.select(:os, options_for_select([["Linux", "linux"], ["Mac", "mac"], ["Windows", "windows"], ["Other", "other"]], @application.os), include_blank: true) %></p>
5357
<p>
5458
<%= f.check_box :needs_computer %>
55-
<%= f.label(:needs_computer, "Or do you need a computer for the workshop?") %>
59+
<%= f.label(:needs_computer, "Or do you need to borrow a laptop for the duration of the workshop?") %>
60+
<p class="note">
61+
We do not have laptops to lend out for the day, but we will try our best to find you one from the community.
62+
If you have a possibility of borrowing a laptop from a friend, that would be very helpful so you can still
63+
tick this box but make sure to mention that in the bottom comment section.
64+
</p>
5665
</p>
57-
<p><%= f.label(:comments, "Is there anything else that you would like to mention?") %></p>
66+
<p><%= f.label(:referred_by, "How did you hear about us?") %></p>
67+
<p><%= f.text_area :referred_by %></p>
68+
69+
<p><%= f.label(:comments, "Is there anything else you would like to mention? For example: why you want to attend?") %></p>
5870
<p><%= f.text_area :comments %></p>
71+
5972
</fieldset>
6073
<fieldset>
6174
<h2>Please read and accept our <a href="http://berlincodeofconduct.org">Code of Conduct</a></h2>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class AddReferredByToApplications < ActiveRecord::Migration[5.2]
2+
def change
3+
add_column :applications, :referred_by, :text
4+
end
5+
end

db/schema.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema.define(version: 2020_02_10_194758) do
13+
ActiveRecord::Schema.define(version: 2020_02_24_192634) do
1414

1515
# These are extensions that must be enabled in order to support this database
1616
enable_extension "plpgsql"
@@ -36,6 +36,7 @@
3636
t.integer "sequence_number"
3737
t.integer "state", default: 0, null: false
3838
t.boolean "attended", default: false
39+
t.text "referred_by"
3940
t.index ["event_id"], name: "index_applications_on_event_id"
4041
end
4142

@@ -51,7 +52,7 @@
5152
t.integer "state", default: 0, null: false
5253
t.boolean "lightningtalk_approved", default: false
5354
t.datetime "contacted_at"
54-
t.boolean "first_time_coaching", default: false
55+
t.boolean "first_time_coaching"
5556
t.index ["coach_id"], name: "index_coach_applications_on_coach_id"
5657
t.index ["event_id"], name: "index_coach_applications_on_event_id"
5758
end

0 commit comments

Comments
 (0)