Sha256: 26f3623c68c7b89386c9f90eb282aec270fade52da05f9d6976710c1436874e3

Contents?: true

Size: 915 Bytes

Versions: 3

Compression:

Stored size: 915 Bytes

Contents

/**
 * @author Mark H Winkler
 * @mixin App.ux.data.Actionable
 * Required use: class using App.ux.data.proxy.Rails
 * 
 * Adds doAction function to class - convenience method for rails proxy doAction
 *  allowing a non rest action to be passed
 *  to Rails (e.g. /teams/delete_all.json).
 *
 * The actionName must exist in the proxy under the 'addActions' config which stores 
 *  the METHOD (GET, POST, PUT, DELETE) and Collection (true = collection or false = member)
 * 
 * params:
 * actionName (string) - required - name of action added to proxy
 * records (array) - optional - array of Model Records
 * options (object) - optional - options to associate with action including callback
 *
 */

Ext.define('<%= app_name %>.ux.data.Actionable', {
	doAction: function(action, records, options) {
		var me = this;
		// call doAction in proxy
		me.getProxy().doAction(action, records, options);
		return me;
	}
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
extjs_scaffold-0.2.1 lib/generators/extjs_scaffold/install/templates/Actionable.js
extjs_scaffold-0.2.0 lib/generators/extjs_scaffold/install/templates/Actionable.js
extjs_scaffold-0.1.1 lib/generators/extjs_scaffold/install/templates/Actionable.js