Unalble to send id to controller action method using thorax.js collection's URL

10 views
Skip to first unread message

rakesh shenishetty

unread,
Apr 10, 2015, 11:34:22 AM4/10/15
to thor...@googlegroups.com

We have implemented the following scenario by taking from a sample application which was working perfectly:

A Thorax model has idAttribute: '_id' without any URL in the model. The respective thorax collection has url: '/employees', without any id appended in this collection's URL. Here 'show' action method of the controller is getting called with the 'id' provided in the URL of the browser. This thorax collection is initialized in the Thorax router.

URL we are giving in the browser: http://localhost:3000/#examplecontroller/12345678
The initialize method of thorax router: 

    initialize: ->
        @employee = new Thorax.Collections.Employees()

URL of the thorax collection is:
    url: '/employees'   

But if we are replicating the same scenario in our application we are unable to call the controller action method with the id when the Thorax router initializes.

Any help will be appreciated.

Reply all
Reply to author
Forward
0 new messages