Skip to content

Commit 89e2fa1

Browse files
authored
Merge pull request #249 from rubymonsters/av-first-time-coaching
first time coaching
2 parents 951c0cb + bc5ad93 commit 89e2fa1

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

app/controllers/coach_applications_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def find_coach_application
5656

5757
def create_coach_application_params
5858
params.require(:coach_application).
59-
permit(:installationparty, :workshopday, :lightningtalk, :notes)
59+
permit(:installationparty, :workshopday, :lightningtalk, :notes, :first_time_coaching)
6060
end
6161

6262
def check_application_status

app/views/coach_applications/new.html.erb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
<%= f.check_box :workshopday %>
1010
<%= f.label(:workshopday, "workshop day") %>
1111
</p>
12+
<h2>Are you coaching for the first time?</h2>
13+
<p>
14+
<%= f.check_box :first_time_coaching %>
15+
<%= f.label(:first_time_coaching, "yes, coaching for the first time") %>
16+
</p>
1217
<h2>Would you like to give a lightning talk? What topic do you have in mind?</h2>
1318
<p class="note">The talk should be understandable for beginners and no longer than 5 minutes.</p>
1419
<p>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class AddFirstTimeCoachingToCoachApplications < ActiveRecord::Migration[5.2]
2+
def change
3+
add_column :coach_applications, :first_time_coaching, :boolean, default: false
4+
end
5+
end

db/schema.rb

Lines changed: 2 additions & 1 deletion
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_190432) do
13+
ActiveRecord::Schema.define(version: 2020_02_10_194758) do
1414

1515
# These are extensions that must be enabled in order to support this database
1616
enable_extension "plpgsql"
@@ -51,6 +51,7 @@
5151
t.integer "state", default: 0, null: false
5252
t.boolean "lightningtalk_approved", default: false
5353
t.datetime "contacted_at"
54+
t.boolean "first_time_coaching", default: false
5455
t.index ["coach_id"], name: "index_coach_applications_on_coach_id"
5556
t.index ["event_id"], name: "index_coach_applications_on_event_id"
5657
end

0 commit comments

Comments
 (0)