app/models/layer/presenter.rb
# Decorates the layer presentation with data if needed. nils on the decoration act as removing the field
Decorates the layer presentation with data if needed. nils on the decoration act as removing the field
Decorates the layer presentation with data if needed . nils on the decoration act as removing the field
def decorate_with_data(source_hash, decoration_data=nil)
        if not decoration_data.nil?
          decoration_data.each { |key, value| 
            source_hash[key] = value
            source_hash.delete_if { |k, v| 
              v.nil? 
            }
          }
        end
        source_hash
      end
def decorate_with_data ( source_hash , decoration_data = nil ) if not decoration_data . nil? decoration_data . each { | key , value | source_hash [ key ] = value source_hash . delete_if { | k , v | v . nil? } } end source_hash end
Decorates the layer presentation with data if needed.
Decorates the layer presentation with data if needed .
source_hash
decoration_data