Hi All,
I am trying to get my created subscribe called but it fails to do so. Below is my code. Any sort help would be highly appreciated. I have spent two days on this and now absolutely clueless. Thanks in advance
- steal('jquery/controller',
- 'jquery/dom/form_params',
- 'jquery/view/ejs',
- 'jquery/controller/view',
- 'jquery/controller/subscribe',
- 'steal/less')
- .then(function(){
- $.Controller('DefectController',{},
- // Some code ...
- "defect.created subscribe" : function(called, defect){
- this.refreshResults();
- },
- // Some code
- });
- $.Model.extend('Defect',
- /* @Static */
- {
- create : function(params, success, error){
- $.ajax({
- url: 'defects.json',
- type: 'post',
- cache: false,
- dataType: 'json defect.model',
- success: success,
- error: error,
- complete: this.callback("createResponse",success, error),
- data: $.toJSON(params),
- fixture: "-restCreate"
- })
- }
- }
- {
- created : function(attrs){
- return this._super(attrs);
- },
- }
- });