diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-28 00:02:59 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-28 00:02:59 +0100 |
commit | 2c70f0ecaa507427d2592434cb4a516bcedd5039 (patch) | |
tree | 7d5382144ae1c6d8f87af3b09c06654db5740684 /app/models | |
parent | fa29ef3a41816ee915c52707bcd9db6cc9cdf7d6 (diff) |
Adding paperclip for avatars, fixing design of the public pages
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/account.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 1b4f4ebdf..0940118dc 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -2,6 +2,10 @@ class Account < ActiveRecord::Base # Local users has_one :user, inverse_of: :account + # Avatar upload + has_attached_file :avatar, styles: { large: '300x300#', medium: '96x96#', small: '48x48#' } + validates_attachment_content_type :avatar, content_type: /\Aimage\/.*\Z/ + # Timelines has_many :stream_entries, inverse_of: :account has_many :statuses, inverse_of: :account |