aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-12-17 21:51:43 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-12-18 08:28:21 -0200
commitc3e573db54c55c4e4ac694940c6d2f5b42b6155b (patch)
tree7671f95fe0f4bb3a2de658db36a15bf859324f72 /actionpack/lib/action_dispatch/middleware
parentbd5f0ada125004a3d91390e43d914f92b00139d8 (diff)
downloadrails-c3e573db54c55c4e4ac694940c6d2f5b42b6155b.tar.gz
rails-c3e573db54c55c4e4ac694940c6d2f5b42b6155b.tar.bz2
rails-c3e573db54c55c4e4ac694940c6d2f5b42b6155b.zip
Minor js review [ci skip]
Remove/add ; where necessary, fix indentation.
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-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();