app/assets/javascripts/pwn-fx.js.coffee in pwnstyles_rails-0.1.32 vs app/assets/javascripts/pwn-fx.js.coffee in pwnstyles_rails-0.1.33

- old
+ new

@@ -194,10 +194,12 @@ onClick = (event) -> scope = PwnFx.resolveScope scopeId, element source = scope.querySelector sourceSelector html = source.innerHTML if randomizeRegExp - randomId = 'r' + Date.now() + '_' + Math.random() + # The id has to be completely numerical, otherwise strong_parameters + # will think it's an attribute and reject it. + randomId = Date.now() + Math.random().toString().substring(2) html = html.replace randomizeRegExp, randomId for targetElement in PwnFx.queryScope(scope, targetSelector) targetElement.insertAdjacentHTML insertionPoint, html PwnFx.wire targetElement event.preventDefault()