Commit 916165df authored by Andrey Kumanyaev's avatar Andrey Kumanyaev

username is default param to User

parent df64bdff
......@@ -143,6 +143,11 @@ class User < ActiveRecord::Base
#
# Instance methods
#
def to_param
username
end
def generate_password
if self.force_random_password
self.password = self.password_confirmation = Devise.friendly_token.first(8)
......
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