volt-user-templates 0.0.1 → 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: 36034976bc2df09e8899d2b4906c1870e5fc0b99
4
- data.tar.gz: 21b82dd942bec3d470f1f82039fa45c527dc4b0b
3
+ metadata.gz: 35b55f0963702bee1d10455188c64cf7f8be47b3
4
+ data.tar.gz: 6474fbc54a9f277e15181b99db975e29823083c5
5
5
  SHA512:
6
- metadata.gz: 7b5c496f8a0ae3718908822843d5e6bd5d6c55813cd802aa0fcdc6b7ce5feadebc35d653683cd6b7a308ff66099488b9d1c6cec28b8121769b428eef555109d8
7
- data.tar.gz: 6ae40c51bffd2bff3643b77e6e34e4a5aa950aa22aba572844ae9cdb35962c2214766f26d37f73b882fcefb9db2646c718458ec9750db53d36f5045b93eab338
6
+ metadata.gz: cd64216f5950cd6e88114cfb125987acd4663d94f33198529228303e5cc5c3eee6de76d0fc9ff3adf1360b3f155aaef5e5aa6f23d65f71b828b854571cde05a5
7
+ data.tar.gz: e5a6955824833d60a47bc71417851ab9406ed465f7c0f3cdc37cf0674e4d16e4905b131c3abd46fd413af6b848d6c6f4de2fd0828d5d69b5263f29ac300a21ea
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.3
@@ -5,12 +5,23 @@ module UserTemplates
5
5
  end
6
6
 
7
7
  def signup
8
+ # Get login and password to login
9
+ login = model.send(:"_#{User.login_field}")
10
+ password = model._password
11
+
8
12
  save!.then do |result|
9
13
  flash._notices << "Signup successful"
10
14
 
11
15
  post_signup_url = attrs.post_signup_url.or('/')
12
16
 
13
- go post_signup_url
17
+ # On a successful signup, then login
18
+ Volt.login(login, password).then do
19
+ # Redirect to post signup url
20
+ go post_signup_url
21
+ end.fail do |errors|
22
+ # Show the error (probably only the server goes down)
23
+ flash._errors << errors.to_s
24
+ end
14
25
  end.fail do |err|
15
26
  puts "ERR: #{err.inspect}"
16
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volt-user-templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-08 00:00:00.000000000 Z
11
+ date: 2014-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: volt-fields