Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

Allow resources to be set via function #13

Closed
wants to merge 1 commit into from

Conversation

amsross
Copy link

@amsross amsross commented Sep 16, 2013

Allows the resource option to be set in the constructor as a function. The required return value must be an array.

    resources: function() {
        return ['resource 1', 'resource 2'];
    },
    resources: function() {
        $.ajax(...)
        .success( function(data) {
            // some sort of logic
            return preppedData;
        });
    },

This should solve Issue #8.

@josephleniston
Copy link

See #8 for example code of how to do this with existing code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants