Create deferred not being executed

For some reason, My deferred on my model’s create method seems that it’s not being executed.

My create method

"#add_feed click": function(){
  var self = this;
  var new_url        = $('#url_input').val();
  var policy_id      = $('#policy_dropdown')[0].selectedOptions[0];
  var new_feed_def   = SyndicateFeed.create({ url: new_url, policy_id: policy_id });

    console.log('In new_feed_def');
    var feeds_def = SyndicateFeed.findAll({});
      self.options.feeds = feeds;

For some reason, the console.log() inside the .then function never gets called.

I figured out what was wrong, I am fairly new to JS development and I failed to realize that my ruby methods must return json in order for the ajax calls to work properly :\

1 Like