lib/onoma/item.rb in onoma-0.7.0 vs lib/onoma/item.rb in onoma-0.8.0
- old
+ new
@@ -277,9 +277,10 @@
property = @nomenclature.properties[name]
value = @attributes[name]
if property
if value.nil? && property.fallbacks
property.fallbacks.each do |fallback|
+ value ||= @name if fallback == :name
value ||= @attributes[fallback]
break if value
end
end
value = cast_property(name, property.default) if property.default && value.nil?