0
0
Fork 0

Refactoring Grape API methods into normal controllers & other things

This commit is contained in:
Eugen Rochko 2016-02-29 19:42:08 +01:00
parent 11ff92c9d7
commit 0e8f59c16f
63 changed files with 336 additions and 406 deletions

View file

@ -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)