Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- active: function() {
- if (App.selectedCoreController.content) {
- Ember.RSVP.Promise.cast(Ember.$.getJSON('/ALL/' + App.selectedCoreController.content))
- .then(undefined, function() {
- return null;
- })
- .then(function(response) {
- App.FieldsController.fields = response.fields.map(function(d) {
- return d.name;
- });
- });
- console.log(App.FieldsController.fields);
- return App.FieldsController.fields;
- } else {
- return null;
- }
- }.property("App.selectedCoreController.content").cacheable()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement