Advertisement
Guest User

Untitled

a guest
Aug 28th, 2014
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  active: function() {
  2.         if (App.selectedCoreController.content) {
  3.             Ember.RSVP.Promise.cast(Ember.$.getJSON('/ALL/' + App.selectedCoreController.content))
  4.                 .then(undefined, function() {
  5.                     return null;
  6.                 })
  7.                 .then(function(response) {
  8.                     App.FieldsController.fields = response.fields.map(function(d) {
  9.                         return d.name;
  10.                     });
  11.                 });
  12.             console.log(App.FieldsController.fields);
  13.             return App.FieldsController.fields;        
  14.         } else {
  15.             return null;
  16.         }
  17.     }.property("App.selectedCoreController.content").cacheable()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement