Remove unneeded profile picture assign

This commit is contained in:
Eric 2020-06-02 17:12:53 -05:00
parent 7a92df977b
commit 3429598874

View file

@ -53,7 +53,6 @@ class Profile < ApplicationRecord
def set_defaults
self.name ||= user.name if user
self.email ||= user.email if user
self.picture.attach(user.picture) if user && user.picture.attached?
picture.attach(io: File.open(Settings.default.image.profile),
filename: "profile-image.png") unless self.picture.attached?
if self.name.blank? && first_name.present? && last_name.present?