Commit 916165dfc4591145ebddee063857e85414b813f6
1 parent
df64bdff
Exists in
master
and in
4 other branches
username is default param to User
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
app/models/user.rb
... | ... | @@ -143,6 +143,11 @@ class User < ActiveRecord::Base |
143 | 143 | # |
144 | 144 | # Instance methods |
145 | 145 | # |
146 | + | |
147 | + def to_param | |
148 | + username | |
149 | + end | |
150 | + | |
146 | 151 | def generate_password |
147 | 152 | if self.force_random_password |
148 | 153 | self.password = self.password_confirmation = Devise.friendly_token.first(8) | ... | ... |