Skip to content

Commit

Permalink
Fixed IndexController sub-routes
Browse files Browse the repository at this point in the history
  • Loading branch information
zerious committed May 29, 2014
1 parent 856e341 commit 790bf06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ module.exports = Class.extend({
(function (action) {
if (typeof action == 'function') {
if (/(GET|PUT|POST|DELETE)/.test(action.name)) {
var url = controller.url +
(property == 'index' ? '' : '/' + property);
property = (property == 'index' ? '' : '/' + property);
var url = (controller.url + property).replace(/\/\//, '/');
var methods = action.name.match(/(GET|PUT|POST|DELETE)/g);
methods.forEach(function (method) {
method = method.toLowerCase();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"express",
"alternative"
],
"version": "0.1.17",
"version": "0.1.18",
"main": "lighter.js",
"homepage": "http://lighter.io/lighter",
"repository": "git://github.com/zerious/lighter.git",
Expand Down

0 comments on commit 790bf06

Please sign in to comment.