FIX: if badge has an image do not override icon

This commit is contained in:
Sam 2016-10-21 10:53:58 +11:00
parent d13cd3471f
commit 35d248ab0d

View File

@ -129,8 +129,10 @@ class Badge < ActiveRecord::Base
end
def default_icon=(val)
self.icon ||= val
self.icon = val if self.icon = "fa-certificate"
unless self.image
self.icon ||= val
self.icon = val if self.icon = "fa-certificate"
end
end
def default_name=(val)