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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d31c41d437dc46e7d2b4c95b27fef37fbcb8efc0
4
- data.tar.gz: 22ec9ef308cd58df3e518c9d26da2250382db666
3
+ metadata.gz: 6625803e19fe85cb9aa39b324bda1fac25b626c3
4
+ data.tar.gz: d614e528ae7e16e97874ca44456914d67cc733b0
5
5
  SHA512:
6
- metadata.gz: 6b2f75b71f9aef28f0f0ae5afe71a0b56faa8f9abfcdf472b475ce2c18b7892699b40f5a270f8ff8e9f262bbbcec0172facf1ff78ded8d0ddefd368a8c7fe09c
7
- data.tar.gz: e268b4a3d4eb4d8702f11ee18b5109d73bfb152cb7e60d607aef0c76a96e32cc57985f3e79d5267d98908688159cf2797881bbef60fef7efac227e45eaaaedc2
6
+ metadata.gz: '0198cae75bc57cac311e68bc705422bc9e4d983ce74b638237a0e68cdc1d719e13c62d3c322a6f84d17d19332b2d55460de4028a62e075e583ab26657af3ec4f'
7
+ data.tar.gz: bd3c43bc8f868c90b21140b5bfb2ce2420f98a7783af1ce63bb141be82f668ae5d8a4250487a07f5c911aaed14e15e0fbf38333df03c2d70cd1db954a34a9f79
@@ -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
- belongs_to :recipient, class_name: Invitation.configuration.user_model_class_name
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
@@ -1,3 +1,3 @@
1
1
  module Invitation
2
- VERSION = '0.4.3'.freeze
2
+ VERSION = '0.4.4'.freeze
3
3
  end
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.3
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-07-21 00:00:00.000000000 Z
11
+ date: 2017-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails