instant_login 0.0.2 → 0.0.3
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: 2f8dff1f8d02ca8b0f13d71b0fc327fe0f7acc63
|
4
|
+
data.tar.gz: bf3f91a45e5f459388c640481e7cd47a4b77dc2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2b213566359d7f7d288728e3d27345c5192256b971bfbc3ed3635230be6a0378703e833f8a625f059be0edb5fc8491f4138541b0a2d71d45b20d0a16259a706
|
7
|
+
data.tar.gz: 215e2ce0aad3d1069e678a4f108c5a48d45e68ebf18f085fe9f40269c4aeb0af4e8adab0e4e04f4f941a227dfc8eaab7c3d443d19425091d50186c1307a3ff69
|
@@ -6,7 +6,14 @@ module InstantLogin
|
|
6
6
|
user = InstantLogin.config.user_class.find_by(email: params[:email])
|
7
7
|
if user
|
8
8
|
user.generate_instant_login_token
|
9
|
-
InstantLogin.config.mailer_class.token(user)
|
9
|
+
mail = InstantLogin.config.mailer_class.token(user)
|
10
|
+
|
11
|
+
if mail.respond_to?(:deliver_now)
|
12
|
+
mail.deliver_now
|
13
|
+
else
|
14
|
+
mail.deliver
|
15
|
+
end
|
16
|
+
|
10
17
|
redirect_to '/', notice: 'Login email sent'
|
11
18
|
else
|
12
19
|
redirect_to '/', alert: 'User not found'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: instant_login
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephan Pavlovic
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-03-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|