Sha256: 43a52583c820a1dab8a6d2623e6ea945b1b53fb4477668c53cb67ada2d3b42d2

Contents?: true

Size: 875 Bytes

Versions: 7

Compression:

Stored size: 875 Bytes

Contents

/**
 * class ExtMVC.model.Association
 * @ignore
 */
ExtMVC.model.Association = {
  
  /**
   * @ignore
   * Returns the default association name for a given class (e.g. "Post" becomes "posts", "SecretAgent" becomes "secretAgents" etc)
   * @param {String} className The string name of the class which this belongs to
   * @return {String} The association name for this class
   */
  hasManyAssociationName: function(className) {
    return className.toLowerCase() + 's';
  },
  
  /**
   * @ignore
   * Returns the default association name for a given class (e.g. "Post" becomes "post", "SecretAgent" becomes "secretAgent")
   * @param {String} className The string name of the class to calculate a belongsTo name for
   * @return {String} The association name for this class
   */
  belongsToAssociationName: function(className) {
    return className.toLowerCase();
  }
};

Version data entries

7 entries across 6 versions & 1 rubygems

Version Path
extjs-mvc-0.4.0.k test/app/vendor/extjs-mvc/model/Association.js
extjs-mvc-0.4.0.k lib/extjs-mvc/src/model/Association.js
extjs-mvc-0.4.0.f lib/src/model/Association.js
extjs-mvc-0.4.0.e lib/vendor/model/Association.js
extjs-mvc-0.4.0.d lib/vendor/model/Association.js
extjs-mvc-0.4.0.b lib/js/model/Association.js
extjs-mvc-0.4.0.a lib/js/model/Association.js