invitation 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/invite.rb +7 -1
- data/lib/invitation/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6625803e19fe85cb9aa39b324bda1fac25b626c3
|
4
|
+
data.tar.gz: d614e528ae7e16e97874ca44456914d67cc733b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0198cae75bc57cac311e68bc705422bc9e4d983ce74b638237a0e68cdc1d719e13c62d3c322a6f84d17d19332b2d55460de4028a62e075e583ab26657af3ec4f'
|
7
|
+
data.tar.gz: bd3c43bc8f868c90b21140b5bfb2ce2420f98a7783af1ce63bb141be82f668ae5d8a4250487a07f5c911aaed14e15e0fbf38333df03c2d70cd1db954a34a9f79
|
data/app/models/invite.rb
CHANGED
@@ -5,7 +5,13 @@
|
|
5
5
|
class Invite < ActiveRecord::Base
|
6
6
|
belongs_to :invitable, polymorphic: true
|
7
7
|
belongs_to :sender, class_name: Invitation.configuration.user_model_class_name
|
8
|
-
|
8
|
+
|
9
|
+
# Rails >= 5 makes belongs_to association required by default
|
10
|
+
if Rails::VERSION::MAJOR >= 5
|
11
|
+
belongs_to :recipient, class_name: Invitation.configuration.user_model_class_name, optional: true
|
12
|
+
else
|
13
|
+
belongs_to :recipient, class_name: Invitation.configuration.user_model_class_name
|
14
|
+
end
|
9
15
|
|
10
16
|
before_create :generate_token
|
11
17
|
before_save :set_email_case, on: :create
|
data/lib/invitation/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: invitation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Tomich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|