Sha256: de059fa4b7bd33a2be8d59fdb226731193dff98677ede123a38bb934a48cbd61
Contents?: true
Size: 302 Bytes
Versions: 1
Compression:
Stored size: 302 Bytes
Contents
# $('form').serializeObject() # => {name:'Craig', hobby:'Pro Pogo'} $.fn.serializeObject = -> o = {} a = @serializeArray() $.each a, -> if o[@name] isnt `undefined` o[@name] = [o[@name]] unless o[@name].push o[@name].push @value or "" else o[@name] = @value or "" o
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails-backbone-generator-0.1.9 | lib/generators/backbone_generator/setup_generator/templates/app/assets/javascripts/shared/utils/serialize_object.coffee |