From 0e8f59c16fcb21301c736ecbc4424cb4c5388c42 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 29 Feb 2016 19:42:08 +0100 Subject: Refactoring Grape API methods into normal controllers & other things --- app/models/account.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/models/account.rb') 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) -- cgit