hackathon_manager 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e93acd032a5487abac9bafef88d9dbde33faf550
|
4
|
+
data.tar.gz: 41432ab2aad72cecdcf868ed570da44985063f57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff8de464d340aa82f77a4b907dce92727bb9c1a3c0af8fb633ce574aff2e66b261af977358fb83d2f030213ca122e733feaba65d88be9e9148a486653be4be93
|
7
|
+
data.tar.gz: 8841655b88c7a9f1100dcfa5f44389da7e3c3e9d53af848f1142a62b5ce3527f66adbad2e24baa3d8931527c39ede46d9418ebc6b552390a580d837d4be07123
|
@@ -109,7 +109,9 @@ class Manage::QuestionnairesController < Manage::ApplicationController
|
|
109
109
|
@questionnaire.acc_status_author_id = current_user.id
|
110
110
|
@questionnaire.acc_status_date = Time.now
|
111
111
|
|
112
|
-
|
112
|
+
if @questionnaire.save(validate: false)
|
113
|
+
flash[:notice] = "Updated acceptance status to \"#{Questionnaire::POSSIBLE_ACC_STATUS[new_status]}\""
|
114
|
+
else
|
113
115
|
flash[:notice] = "Failed to update acceptance status"
|
114
116
|
end
|
115
117
|
|
@@ -52,13 +52,16 @@ class Manage::StatsController < Manage::ApplicationController
|
|
52
52
|
|
53
53
|
def mlh_info
|
54
54
|
data = Rails.cache.fetch(cache_key_for_questionnaires("mlh_info")) do
|
55
|
-
attributes = [
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
55
|
+
attributes = [
|
56
|
+
:first_name,
|
57
|
+
:last_name,
|
58
|
+
:email,
|
59
|
+
:phone
|
60
|
+
]
|
61
|
+
select_attributes = Array.new(attributes) << [:user_id, :school_id]
|
62
|
+
json_attribute = Array.new(attributes) << :school_name
|
63
|
+
data = Questionnaire.joins(:school).select(select_attributes)
|
64
|
+
to_json_array(data, json_attribute)
|
62
65
|
end
|
63
66
|
render json: { data: data }
|
64
67
|
end
|
data/app/models/questionnaire.rb
CHANGED
@@ -93,6 +93,10 @@ class Questionnaire < ApplicationRecord
|
|
93
93
|
School.find(school_id) if school_id
|
94
94
|
end
|
95
95
|
|
96
|
+
def school_name
|
97
|
+
school.name if school_id
|
98
|
+
end
|
99
|
+
|
96
100
|
def full_name
|
97
101
|
"#{first_name} #{last_name}"
|
98
102
|
end
|
@@ -193,10 +197,10 @@ class Questionnaire < ApplicationRecord
|
|
193
197
|
end
|
194
198
|
|
195
199
|
def queue_triggered_email_update
|
196
|
-
Message.queue_for_trigger("questionnaire.#{acc_status}",
|
200
|
+
Message.queue_for_trigger("questionnaire.#{acc_status}", user_id) if saved_change_to_acc_status?
|
197
201
|
end
|
198
202
|
|
199
203
|
def queue_triggered_email_create
|
200
|
-
Message.queue_for_trigger("questionnaire.#{acc_status}",
|
204
|
+
Message.queue_for_trigger("questionnaire.#{acc_status}", user_id)
|
201
205
|
end
|
202
206
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hackathon_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stuart Olivera
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|