Commit 56dbfd2a authored by Jakub Troszok's avatar Jakub Troszok

Implementing automatic password generation.

parent 9132d309
......@@ -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?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment