lib/volt/models/model_hash_behaviour.rb in volt-0.8.17 vs lib/volt/models/model_hash_behaviour.rb in volt-0.8.18

- old
+ new

@@ -44,10 +44,10 @@ (@attributes || {}).each_with_object(*args, &block) end # Convert the model to a hash all of the way down. def to_h - if empty? + if @attributes.nil? nil else hash = {} attributes.each_pair do |key, value| hash[key] = deep_unwrap(value)