backframe 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/backframe/acts_as_user.rb +0 -17
- data/lib/backframe/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ceda85c65ab0c2f0625e23aac982de9b91a9bbb2
|
4
|
+
data.tar.gz: 0efa899518a8b93daa01fe206c45514775813cdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d30297a31c30d271a8be8d488f55c517b9ef82f2096ae3cb1088e753cf9cf1fe48b1193e574fff8e5ed5878ecdd4e0cf6208eedfa5fae64f748db944f6239797
|
7
|
+
data.tar.gz: 36414af8280ceb9a3804df6d660db327033c8cc67e5bbb917bf3bec680759c1e0e3bec78e001f9b3c296729ba2c50bb34540d9d50fc6d5a41592fac34606f22d
|
@@ -12,12 +12,7 @@ module Backframe
|
|
12
12
|
|
13
13
|
attr_accessor :password, :change_password, :set_password, :old_password, :new_password, :confirm_password, :confirm_email
|
14
14
|
|
15
|
-
has_many :activations, :dependent => :destroy
|
16
|
-
has_many :resets, :dependent => :destroy
|
17
|
-
|
18
15
|
after_validation :set_new_password, :if => Proc.new { |u| u.new_password.present? }
|
19
|
-
after_create :activate
|
20
|
-
after_save :update_activities, :if => Proc.new { |u| u.first_name_changed? || u.last_name_changed? }
|
21
16
|
|
22
17
|
validates_presence_of :first_name, :last_name, :email
|
23
18
|
validates_uniqueness_of :email
|
@@ -54,14 +49,6 @@ module Backframe
|
|
54
49
|
self.password_hash == BCrypt::Engine.hash_secret(password, self.password_salt)
|
55
50
|
end
|
56
51
|
|
57
|
-
def reset
|
58
|
-
self.resets.create
|
59
|
-
end
|
60
|
-
|
61
|
-
def activate
|
62
|
-
self.activations.create
|
63
|
-
end
|
64
|
-
|
65
52
|
def password=(password)
|
66
53
|
@password = password
|
67
54
|
self.password_salt = BCrypt::Engine.generate_salt
|
@@ -88,10 +75,6 @@ module Backframe
|
|
88
75
|
self.password = self.new_password
|
89
76
|
end
|
90
77
|
|
91
|
-
def update_activities
|
92
|
-
Activity.where(:#{self.name.downcase}_id => self.id).update_all(:updated_at => Time.zone.now)
|
93
|
-
end
|
94
|
-
|
95
78
|
EOV
|
96
79
|
|
97
80
|
end
|
data/lib/backframe/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backframe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Kops
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-05-
|
12
|
+
date: 2016-05-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: write_xlsx
|