aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware/templates/routes/_route_wrapper.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/templates/routes/_route_wrapper.html.erb')
-rw-r--r--actionpack/lib/action_dispatch/middleware/templates/routes/_route_wrapper.html.erb14
1 files changed, 7 insertions, 7 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/templates/routes/_route_wrapper.html.erb b/actionpack/lib/action_dispatch/middleware/templates/routes/_route_wrapper.html.erb
index 9bf5c96c95..dc17cb77ef 100644
--- a/actionpack/lib/action_dispatch/middleware/templates/routes/_route_wrapper.html.erb
+++ b/actionpack/lib/action_dispatch/middleware/templates/routes/_route_wrapper.html.erb
@@ -24,22 +24,22 @@
<script type='text/javascript'>
function each(elems, func) {
- if (!elems instanceof Array) var elems = [elems];
- for(var i = elems.length; i--; ) {
+ if (!elems instanceof Array) { elems = [elems]; }
+ for (var i = elems.length; i--; ) {
func(elems[i]);
- };
+ }
}
function setValOn(elems, val) {
each(elems, function(elem) {
elem.innerHTML = val;
- })
+ });
}
- function onClick(elems, func) {
+ function onClick(elems, func) {
each(elems, function(elem) {
elem.onclick = func;
- })
+ });
}
// Enables functionality to toggle between `_path` and `_url` helper suffixes
@@ -49,7 +49,7 @@
var helperTxt = this.getAttribute("data-route-helper");
var helperElems = document.querySelectorAll('[data-route-name] span.helper');
setValOn(helperElems, helperTxt);
- })
+ });
}
setupRouteToggleHelperLinks();