vhochstein / active_scaffold

Rails 4 Version of activescaffold supporting jquery
MIT License
156 stars 34 forks source link

in_place_edit eid parameter fix #129

Closed bardbess closed 13 years ago

bardbess commented 13 years ago

Bug in frontends/default/javascripts/prototype/active_scaffold.js:187

When I call in_place_edit on a check-box in an embedded active scaffold (with the desire to override the update_column.js.rjs) the authenticity token and eid get merged into one parameter.

Parameters: {"authenticity_token"=>"1dAC8uo4hUD6LZHeM/bMY8xz/WAsmFPXInIy4w0wVGA=;eid=d755e1feda8f2fb1a4592e0d7569a8a7", "_"=>"", "column"=>"checkbox", "id"=>"2"}

existing argument in the active_scaffold.js is: if (span.up('div.active-scaffold').readAttribute('data-eid')) { if (options['params'].length > 0) { options['params'] += ";"; } options['params'] += ("eid=" + span.up('div.active-scaffold').readAttribute('data-eid')); }

options['params'] += ";"; should be changed to options['params'] += "&";

vhochstein commented 13 years ago

Awesome, it s fixed. thanks a lot for your reporting and fixing it