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: 94e95485452bd9f1629f246807eaa7c986fc09b3
4
- data.tar.gz: 73b385826f49cea7388edc00d21f895d426e82f8
3
+ metadata.gz: ab564f2a4d0c69e751b7792ce13377f59b99b439
4
+ data.tar.gz: 19bee13eb29a9041b6afe38e1dc6c162e9559b8c
5
5
  SHA512:
6
- metadata.gz: 0d8fbc893b975faa719a60b77ce52c3419ddd7436855fa775ef88f6292a2c298dbc31ea8109d0e2038fc9d7541543f035fa49fd51def5851880b21e24b62af58
7
- data.tar.gz: b346b58a716f2405f858ca8df0a21562af6222a913532a83c852385a0061c45b16be1e86440bd4a36c35afa02b0e0ac770a74595d81b01463cfa9a4dd4558c66
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
- @user_model.name.to_s
69
+ user_model.name.to_s
66
70
  end
67
71
 
68
72
  def user_model_instance_var
69
- '@' + @user_model.name.demodulize.underscore
73
+ '@' + user_model.name.demodulize.underscore
70
74
  end
71
75
 
72
76
  # @return [Boolean] are Invitation's built-in routes enabled?
@@ -1,3 +1,3 @@
1
1
  module Invitation
2
- VERSION = '0.4.1'.freeze
2
+ VERSION = '0.4.2'.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.1
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-04-27 00:00:00.000000000 Z
11
+ date: 2017-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails