lib/volt/models/model_hash_behaviour.rb in volt-0.8.22.beta2 vs lib/volt/models/model_hash_behaviour.rb in volt-0.8.22

- old
+ new

@@ -66,9 +66,15 @@ def each_with_object(*args, &block) (@attributes || {}).each_with_object(*args, &block) end + def each(&block) + # TODO: We shouldn't need to check the size for this to work + size + @array.each(&block) + end + def each_pair @attributes.each_pair do |k,v| yield(k,v) unless v.is_a?(Model) && v.nil? end end