Sha256: e072560ea010d502f179abd24b5657d01c65717ed1a8d7f059c7fd70f308bc10

Contents?: true

Size: 432 Bytes

Versions: 14

Compression:

Stored size: 432 Bytes

Contents

DynamicAttributes.module_eval do
  # Overrides the initializer to take dynamic attributes into account
  def initialize(attributes = nil, options = {})
    dynamic_attributes = {}
    (attributes ||= {}).each{|att,value| dynamic_attributes[att] = value if att.to_s.starts_with?(self.dynamic_attribute_prefix) }
    super(attributes.except(*dynamic_attributes.keys), options)
    set_dynamic_attributes(dynamic_attributes)
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
erp_forms-3.1.2 lib/erp_forms/dynamic_attributes_patch.rb
erp_forms-3.1.1 lib/erp_forms/dynamic_attributes_patch.rb
erp_forms-3.1.0 lib/erp_forms/dynamic_attributes_patch.rb
erp_forms-3.0.2 lib/erp_forms/dynamic_attributes_patch.rb
erp_forms-3.0.1 lib/erp_forms/dynamic_attributes_patch.rb
erp_forms-3.0.0 lib/erp_forms/dynamic_attributes_patch.rb
erp_forms-2.1.0 lib/erp_forms/dynamic_attributes_patch.rb
erp_forms-2.0.6 lib/erp_forms/dynamic_attributes_patch.rb
erp_forms-2.0.5 lib/erp_forms/dynamic_attributes_patch.rb
erp_forms-2.0.4 lib/erp_forms/dynamic_attributes_patch.rb
erp_forms-2.0.3 lib/erp_forms/dynamic_attributes_patch.rb
erp_forms-2.0.2 lib/erp_forms/dynamic_attributes_patch.rb
erp_forms-2.0.1 lib/erp_forms/dynamic_attributes_patch.rb
erp_forms-2.0.0 lib/erp_forms/dynamic_attributes_patch.rb