Skip to content

Instantly share code, notes, and snippets.

@chtrinh
Created August 1, 2013 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chtrinh/6133442 to your computer and use it in GitHub Desktop.
Save chtrinh/6133442 to your computer and use it in GitHub Desktop.
map = {};
_ref = form.serializeArray();
_ref1 = this.model.parameters;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
o = _ref[_i];
if ((o.value != null) && jQuery.trim(o.value).length > 0) {
if (_ref1[_i].allowMultiple) {
map[o.name] = o.value.split(",");
} else {
map[o.name] = o.value;
}
}
}
@canadaduane
Copy link

@canadaduane
Copy link

BTW, if you have any updates to share back to the code base, it would be appreciated. I'm trying to get rails style params working for our app as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment