Class: Builder::XhtmlMarkup

Inherits:
XmlMarkup
  • Object
show all
Defined in:
lib/active_form/core_extensions.rb

Instance Method Summary collapse

Instance Method Details

#_insert_attributes(attrs, order = []) ⇒ Object



6
7
8
9
10
11
# File 'lib/active_form/core_extensions.rb', line 6

def _insert_attributes(attrs, order=[])
  attributes = attrs.respond_to?(:delete_blanks) ? attrs.delete_blanks : attrs
  attributes.stringify_keys!   if attributes.respond_to?(:stringify_keys)
  order = attributes.keys.sort if attributes.respond_to?(:stringify_keys) && order.empty?
  super(attributes, order)
end