FIX: blanking theme field was not properly removing it

This commit is contained in:
Sam
2017-04-13 17:24:15 -04:00
parent 9927489f4e
commit 809fbb25ce
2 changed files with 7 additions and 4 deletions

View File

@ -213,7 +213,7 @@ class Theme < ActiveRecord::Base
field = theme_fields.find{|f| f.name==name && f.target == target_id}
if field
if value.blank?
field.destroy
theme_fields.delete field.destroy
else
if field.value != value
field.value = value