From 56dbfd2af3174a94d0c5ed93a14dd3244370d2f0 Mon Sep 17 00:00:00 2001 From: Jakub Troszok Date: Sun, 24 Jun 2012 22:38:29 +0200 Subject: [PATCH] Implementing automatic password generation. --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 484853bb..4367c0c1 100644 --- 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, :on1 => :create + before_validation :generate_password, :on => :create def generate_password if self.password.blank? && self.password_confirmation.blank?