Sha256: 7d98fa29350ba925f6fc5a3acb7cc6de0b04c23bc473dc7c5d81e4c56c245620

Contents?: true

Size: 1.18 KB

Versions: 10

Compression:

Stored size: 1.18 KB

Contents

(function() {
  var Message, MessagesCollection,
    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  Rev.appModel('Message', Message = (function(superClass) {
    extend(Message, superClass);

    function Message() {
      return Message.__super__.constructor.apply(this, arguments);
    }

    Message.prototype.url = function() {
      if (this.id != null) {
        return "/messages/" + this.id;
      } else {
        return "/messages";
      }
    };

    return Message;

  })(Rev.Model));

  Rev.appObject('Collections.Messages', MessagesCollection = (function(superClass) {
    extend(MessagesCollection, superClass);

    function MessagesCollection() {
      return MessagesCollection.__super__.constructor.apply(this, arguments);
    }

    MessagesCollection.prototype.model = App.Models.Message;

    MessagesCollection.prototype.url = "/messages";

    return MessagesCollection;

  })(Rev.Collection));

}).call(this);

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
revelry_core-0.1.14.0 spec/dummy/tmp/jasmine/assets/models/Message.self.js
revelry_core-0.1.13.0 spec/dummy/tmp/jasmine/assets/models/Message.self.js
revelry_core-0.1.12.4 spec/dummy/tmp/jasmine/assets/models/Message.self.js
revelry_core-0.1.12.2 spec/dummy/tmp/jasmine/assets/models/Message.self.js
revelry_core-0.1.11.6 spec/dummy/tmp/jasmine/assets/models/Message.self.js
revelry_core-0.1.10.1 spec/dummy/tmp/jasmine/assets/models/Message.self.js
revelry_core-0.1.10.0 spec/dummy/tmp/jasmine/assets/models/Message.self.js
revelry_core-0.1.9.1 spec/dummy/tmp/jasmine/assets/models/Message.self.js
revelry_core-0.1.9.0 spec/dummy/tmp/jasmine/assets/models/Message.self.js
revelry_core-0.1.8.0 spec/dummy/tmp/jasmine/assets/models/Message.self.js