wbase 0.2.9 → 0.3.0

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: 1bb278209387a6e44cfc1a8a2f5d15d78acc0281
4
- data.tar.gz: d7ece99defd6938a780905f252740eb0ab5209fb
3
+ metadata.gz: c02021b862a568e2f067a1c92c42b1000238dc0e
4
+ data.tar.gz: 422f2f31a08e52e100b15097005a252da0fd252d
5
5
  SHA512:
6
- metadata.gz: 5228b38ea63e37b204dbf6c5fd1f24fd42ed59f627509320642f9bc5f20e44fba5bbbd7bd9d8d87332dbcdad83d5c31d4177788b5f78eac7cbc7eac41ef3a93d
7
- data.tar.gz: 647bf7555982e18f024a06442235f3722c9a0a55c1a31a58c4c297447ede084d56667c16254cfb7ca9e9b64920b2dc46cf3d6cb745f955f92e00d56a205ab278
6
+ metadata.gz: 5843bf47cb6a72ae144b6aaac8af0ee09f2542cbb06675317a37d20403d2504fcc3e470c3e7a5ce3d6572324f5755eef26b47ddfdc7a674ccbf586cd9a06f743
7
+ data.tar.gz: f7c7fcb39b03800d20daee5217e6e6e586edceb64e8b68f68be0124739aef44269d9a97c879f62d7beb8df4ca9b11f17e66d2c9078639283c483d951aa6a4f49
@@ -6,6 +6,7 @@ module Wbase
6
6
 
7
7
  def new
8
8
  @user = User.new
9
+ @user.email = cookies[:email] if cookies[:email]
9
10
  end
10
11
 
11
12
  def create
@@ -36,6 +36,7 @@ module Wbase
36
36
  session[:token] = user.session_token
37
37
  session[:root] = user.root?
38
38
  user.update(login_at: Time.now)
39
+ cookies[:email] = user.email
39
40
  end
40
41
 
41
42
  def logout
@@ -6,7 +6,10 @@ module Wbase
6
6
 
7
7
  included do
8
8
  attr_reader :password
9
- validates :email, presence: true, uniqueness: true
9
+ validates :email, presence: true
10
+ validates :email, uniqueness: {
11
+ message: 'Hmm. That email has already been taken. If you are a new consultant please email hello@roeme.com'
12
+ }
10
13
  validates :password, length: { minimum: 7, allow_nil: true }
11
14
  has_one :subscription, class_name: 'Wbase::Subscription'
12
15
  scope :verified, -> { where(verified: true) }
@@ -12,7 +12,7 @@
12
12
  <div class="form-group ">
13
13
  <div class="col-xs-12">
14
14
  <label for="email">Email</label>
15
- <input class="form-control" id="email" type="email" name="user[email]" required="" placeholder="first.last@gmail.com">
15
+ <input class="form-control" id="email" type="email" name="user[email]" required="" placeholder="first.last@gmail.com" value="<%= @user.email %>" autocomplete="email">
16
16
  </div>
17
17
  </div>
18
18
 
@@ -1,3 +1,3 @@
1
1
  module Wbase
2
- VERSION = "0.2.9"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wbase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - CJ Avilla
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-11 00:00:00.000000000 Z
11
+ date: 2017-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails