Permalink
Browse files

Helper names in camelCase

  • Loading branch information...
1 parent e9a663f commit 0f00514ae2469c9f70b0e9fecc8af47ae8f8b1ed @1602 committed Feb 14, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/railway_routes.js
View
@@ -183,6 +183,10 @@ Map.prototype.addPath = function (templatePath, action, helperName) {
// already defined? not need to redefine
if (helperName in this.pathTo) return;
+ if (this.camelCaseHelperNames && helperName.match(/_/)) {
+ helperName = camelize(helperName);
+ }
+
this.pathTo[helperName] = function (objParam) {
// TODO: thing about removing or rewriting it
// if (arguments.length < (paramsLength - optionalParamsLength) || ) {
@@ -285,6 +289,7 @@ Map.prototype.resources = function (name, params, actions) {
this.subroutes(prefix + '/:' + (singularize(name) || name) + '_id', actions);
}
}
+
// now let's walk through action routes
for (var action in activeRoutes) {
(function (action) {

0 comments on commit 0f00514

Please sign in to comment.