Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Routing Namespaces not working
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
James Wyse  
View profile  
 More options Jun 28 2012, 3:36 am
From: James Wyse <ja...@jameswyse.net>
Date: Thu, 28 Jun 2012 00:36:17 -0700 (PDT)
Local: Thurs, Jun 28 2012 3:36 am
Subject: Routing Namespaces not working

I'm trying to set up an Admin namespace but it doesn't seem to be working.
I'm using the syntax from the documentation but perhaps I've messed up the
syntax.

I get an express error:

*config/routes.js*

> module.exports = function routes() {
>     this.root('test#index');
>     this.namespace('admin', function() {
>         this.resources('users');
>     });
> };

 *app/controllers/admin/users_controller.js*

var locomotive = require('locomotive'),

>     Controller = locomotive.Controller;

> var UsersController = new Controller();

> UsersController.index = function() {
>     this.title = "Users";
>     this.render();
> };

> module.exports = UsersController;

I've tried my controller without the namespace and it works fine. Any help
appreciated, cheers!

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Wyse  
View profile  
 More options Jun 28 2012, 11:33 am
From: James Wyse <ja...@jameswyse.net>
Date: Thu, 28 Jun 2012 08:33:27 -0700 (PDT)
Local: Thurs, Jun 28 2012 11:33 am
Subject: Re: Routing Namespaces not working

Okay it seems this error appears if there is an error in ANY of your
controllers. In another controller I had a require statement with a typo in
the path, took me a while to find that!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »