about summary refs log tree commit diff
path: root/app/models/account.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-02-29 19:42:08 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-02-29 19:42:08 +0100
commit0e8f59c16fcb21301c736ecbc4424cb4c5388c42 (patch)
tree344ac1e0b2d165ba4fe3870f786e854710970ce1 /app/models/account.rb
parent11ff92c9d7b27c2c9ed86f649aef8d956cc8b989 (diff)
Refactoring Grape API methods into normal controllers & other things
Diffstat (limited to 'app/models/account.rb')
-rw-r--r--app/models/account.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 6cb638b3e..6a4aa16b4 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -76,6 +76,10 @@ class Account < ActiveRecord::Base
     @avatar_remote_url = url
   end
 
+  def to_param
+    self.username
+  end
+
   before_create do
     if local?
       keypair = OpenSSL::PKey::RSA.new(Rails.env.test? ? 1024 : 2048)