lib/volt/page/bindings/each_binding.rb
# When a changed event happens, we update to the new size.
When a changed event happens, we update to the new size.
When a changed event happens we update to the new size .
def reload
    values = current_values
    templates_size = @templates.size
    values_size = values.size
    if templates_size < values_size
      (templates_size).upto(values_size-1) do |index|
        item_added(index)
      end
    elsif templates_size > values_size
      (templates_size-1).downto(values_size) do |index|
        item_removed(index)
      end
    end
  end
def reload values = current_values templates_size = @templates . size values_size = values . size if templates_size < values_size ( templates_size ) . upto ( values_size - 1 ) do | index | item_added ( index ) end elsif templates_size > values_size ( templates_size - 1 ) . downto ( values_size ) do | index | item_removed ( index ) end end end
When a changed event happens, we update to the new size.
When a changed event happens we update to the new size .
# Adjust to the new size