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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3179a03e24e7413a00039d28cd61b6beb9f63c0b02bb1534f735e4810c0aa772
4
- data.tar.gz: 8d7e6562888f89ddf82fe13cfeddfe50b84f76273e27a4b4563918bbdad04e5f
3
+ metadata.gz: fab8e17e1999a7078b0cc8109e14ce95160cc7b09e6a928ae1dc3eaa29b92b3c
4
+ data.tar.gz: f59dcff524b52100f39f06fb4816a5505d4f995da3d11a5ec7eaf1cbec671240
5
5
  SHA512:
6
- metadata.gz: 195d207a93df212d4dd957a637cf29c43760914d7f2a17c40cb0c0e39d0ebdabb4888793372bed015982bbe05df098ef076d9dddf1f9e8486af660c4e6f78b72
7
- data.tar.gz: c08e3152758229a33e4d48b54b88d989becf39751c7b6954dfbbd1d01b3d4176aa81f688e839b34604042602a648b77db71e1f2f08d4923236b36585ff5a62b8
6
+ metadata.gz: 0abdd4683517e005567bef53c84608a99d5ac377316284072454dac0758a239478cbf3b29e6937de8f42930571dc2be4f6e9e35731479a82db63814a0cd8d387
7
+ data.tar.gz: 1b67591020869739dccedbf0045e98be9d4bf5934c40ad0846e05b020795b244100afac75ec3c35ac1a9c0e157f1db265895e31304f7a5d2467096cae4243a8f
@@ -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
- before_validation :set_current_organization!, unless: :organization
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
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Domain
3
- VERSION = '7.2.3'
3
+ VERSION = '7.3.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumuki-domain
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.3
4
+ version: 7.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Leonardo Bulgarelli