OSDN Git Service
(root)
/
wvm
/
gitlab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9132d30
)
Implementing automatic password generation.
author
Jakub Troszok
<troszok@gmail.com>
Sun, 24 Jun 2012 20:38:29 +0000
(22:38 +0200)
committer
Jakub Troszok
<troszok@gmail.com>
Sun, 24 Jun 2012 20:38:29 +0000
(22:38 +0200)
app/models/user.rb
patch
|
blob
|
history
diff --git
a/app/models/user.rb
b/app/models/user.rb
index
484853b
..
4367c0c
100644
(file)
--- a/
app/models/user.rb
+++ b/
app/models/user.rb
@@
-53,7
+53,7
@@
class User < ActiveRecord::Base
scope :blocked, where(:blocked => true)
scope :active, where(:blocked => false)
- before_validation :generate_password, :on
1
=> :create
+ before_validation :generate_password, :on => :create
def generate_password
if self.password.blank? && self.password_confirmation.blank?