Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #9882: hash.diff

File hash.diff, 0.6 kB (added by kangax, 9 months ago)

Use Object.isString and Object.toQueryString

  • controls.js

    old new  
    361361      this.options.callback(this.element, entry) : entry; 
    362362 
    363363    if(this.options.defaultParams)  
    364       this.options.parameters += '&' + this.options.defaultParams; 
     364      this.options.parameters += '&' +  
     365        Object.isString(this.options.defaultParams)  
     366          ? this.options.defaultParams  
     367          : Object.toQueryString(this.options.defaultParams) 
    365368     
    366369    new Ajax.Request(this.url, this.options); 
    367370  },