mumuki-domain 7.2.3 → 7.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/assignment.rb +2 -2
- data/app/models/user.rb +7 -1
- data/lib/mumuki/domain/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fab8e17e1999a7078b0cc8109e14ce95160cc7b09e6a928ae1dc3eaa29b92b3c
|
4
|
+
data.tar.gz: f59dcff524b52100f39f06fb4816a5505d4f995da3d11a5ec7eaf1cbec671240
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0abdd4683517e005567bef53c84608a99d5ac377316284072454dac0758a239478cbf3b29e6937de8f42930571dc2be4f6e9e35731479a82db63814a0cd8d387
|
7
|
+
data.tar.gz: 1b67591020869739dccedbf0045e98be9d4bf5934c40ad0846e05b020795b244100afac75ec3c35ac1a9c0e157f1db265895e31304f7a5d2467096cae4243a8f
|
data/app/models/assignment.rb
CHANGED
@@ -40,10 +40,10 @@ class Assignment < Progress
|
|
40
40
|
alias_method :user, :submitter
|
41
41
|
|
42
42
|
after_save :dirty_parent_by_submission!, if: :completion_changed?
|
43
|
-
|
43
|
+
before_save :set_current_organization, unless: :organization
|
44
44
|
|
45
45
|
# TODO: Momentary as some assignments may not have an associated organization
|
46
|
-
def set_current_organization
|
46
|
+
def set_current_organization
|
47
47
|
self.organization = Organization.current
|
48
48
|
end
|
49
49
|
|
data/app/models/user.rb
CHANGED
@@ -36,7 +36,7 @@ class User < ApplicationRecord
|
|
36
36
|
before_validation :set_uid!
|
37
37
|
validates :uid, presence: true
|
38
38
|
|
39
|
-
resource_fields :uid, :social_id, :image_url, :email, :permissions, *profile_fields
|
39
|
+
resource_fields :uid, :social_id, :image_url, :email, :permissions, :verified_first_name, :verified_last_name, *profile_fields
|
40
40
|
|
41
41
|
def last_lesson
|
42
42
|
last_guide.try(:lesson)
|
@@ -105,6 +105,12 @@ class User < ApplicationRecord
|
|
105
105
|
update! self.class.slice_resource_h json
|
106
106
|
end
|
107
107
|
|
108
|
+
def verify_name!
|
109
|
+
self.verified_first_name ||= first_name
|
110
|
+
self.verified_last_name ||= last_name
|
111
|
+
save!
|
112
|
+
end
|
113
|
+
|
108
114
|
def unsubscribe_from_reminders!
|
109
115
|
update! accepts_reminders: false
|
110
116
|
end
|