invitation 0.4.1 → 0.4.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab564f2a4d0c69e751b7792ce13377f59b99b439
|
4
|
+
data.tar.gz: 19bee13eb29a9041b6afe38e1dc6c162e9559b8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e91e724acd4e5f2294c94af74aab19ad3d350db8cb436b8455c5ee578fe4ce47b838a0fb2ffc9dda2a584fe8a5e9cde351fe82a3c44f48117ed9b7fe3ad93d16
|
7
|
+
data.tar.gz: 7b5d05aeb33f61cf0de81f0d445185fab4083e2194a3c776939392701d136f13ac66be5ba736caa9ed80dd63b3754c794c9f4c7959ab51e8a009944b86b92b6d
|
@@ -1,5 +1,5 @@
|
|
1
1
|
Invitation.configure do |config|
|
2
|
-
# config.user_model = ::User
|
2
|
+
# config.user_model = '::User'
|
3
3
|
# config.user_registration_url = ->(params) { Rails.application.routes.url_helpers.sign_up_url(params) }
|
4
4
|
# config.mailer_sender = 'reply@example.com'
|
5
5
|
# config.routes = true
|
@@ -54,19 +54,23 @@ module Invitation
|
|
54
54
|
attr_accessor :case_sensitive_email
|
55
55
|
|
56
56
|
def initialize
|
57
|
-
@user_model = ::User if defined?(::User)
|
57
|
+
@user_model = '::User' #if defined?(::User)
|
58
58
|
@user_registration_url = ->(params) { Rails.application.routes.url_helpers.sign_up_url(params) }
|
59
59
|
@mailer_sender = 'reply@example.com'
|
60
60
|
@routes = true
|
61
61
|
@case_sensitive_email = true
|
62
62
|
end
|
63
63
|
|
64
|
+
def user_model
|
65
|
+
@user_model.constantize
|
66
|
+
end
|
67
|
+
|
64
68
|
def user_model_class_name
|
65
|
-
|
69
|
+
user_model.name.to_s
|
66
70
|
end
|
67
71
|
|
68
72
|
def user_model_instance_var
|
69
|
-
'@' +
|
73
|
+
'@' + user_model.name.demodulize.underscore
|
70
74
|
end
|
71
75
|
|
72
76
|
# @return [Boolean] are Invitation's built-in routes enabled?
|
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.2
|
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-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|