Fix Rails/Blank

This commit is contained in:
Neal Chambers
2023-08-25 09:42:08 +09:00
parent 8ae5b61252
commit 819fa611e8

View File

@@ -13,7 +13,7 @@ class ProducerProperty < ApplicationRecord
end
def property_name=(name)
return unless name.present?
return if name.blank?
self.property = Spree::Property.find_by(name: name) ||
Spree::Property.create(name: name, presentation: name)