Sha256: c7dedb9f296630731aa416b5f77db000af03248d98ac968d8432efdea01e8987

Contents?: true

Size: 1.27 KB

Versions: 11

Compression:

Stored size: 1.27 KB

Contents

I"	(function() {
  var 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;

  App.Validators.Confirmation = (function(superClass) {
    extend(Confirmation, superClass);

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

    Confirmation.prototype.validate = function() {
      var properVal;
      this.properAttr = this.attr + "Confirmation";
      properVal = this.obj[this.properAttr];
      if ((this.val != null) && (properVal != null) && this.val === properVal) {
        return true;
      }
      this._addErrorMessage();
      return false;
    };

    Confirmation.prototype._addErrorMessage = function() {
      var attrName, message;
      console.log("TODO: implement I18n");
      attrName = this.attr.charAt(0).toUpperCase() + this.attr.slice(1);
      message = "doesn't match " + attrName;
      return this.obj.addErrorMessage(message, {
        "for": this.properAttr
      });
    };

    return Confirmation;

  })(App.Validators.Base);

}).call(this);
:ET

Version data entries

11 entries across 4 versions & 1 rubygems

Version Path
loco-rails-1.0.2 test/dummy/tmp/cache/assets/sprockets/v3.0/I_eYQo-PIB26ThZLPef1mrJs4U2tpRFqiL_q_JrB3FA.cache
loco-rails-1.0.2 test/dummy/tmp/cache/assets/test/sprockets/v3.0/I_eYQo-PIB26ThZLPef1mrJs4U2tpRFqiL_q_JrB3FA.cache
loco-rails-1.0.2 test/dummy/tmp/cache/assets/sprockets/v3.0/ZJ8iHEHOIUivyRfSxjzRkdwMFa4L4By2pw3bcjw1kg8.cache
loco-rails-1.0.1 test/dummy/tmp/cache/assets/sprockets/v3.0/I_eYQo-PIB26ThZLPef1mrJs4U2tpRFqiL_q_JrB3FA.cache
loco-rails-1.0.1 test/dummy/tmp/cache/assets/sprockets/v3.0/ZJ8iHEHOIUivyRfSxjzRkdwMFa4L4By2pw3bcjw1kg8.cache
loco-rails-1.0.1 test/dummy/tmp/cache/assets/test/sprockets/v3.0/I_eYQo-PIB26ThZLPef1mrJs4U2tpRFqiL_q_JrB3FA.cache
loco-rails-1.0.0 test/dummy/tmp/cache/assets/sprockets/v3.0/I_eYQo-PIB26ThZLPef1mrJs4U2tpRFqiL_q_JrB3FA.cache
loco-rails-1.0.0 test/dummy/tmp/cache/assets/sprockets/v3.0/ZJ8iHEHOIUivyRfSxjzRkdwMFa4L4By2pw3bcjw1kg8.cache
loco-rails-1.0.0 test/dummy/tmp/cache/assets/test/sprockets/v3.0/I_eYQo-PIB26ThZLPef1mrJs4U2tpRFqiL_q_JrB3FA.cache
loco-rails-0.0.1 test/dummy/tmp/cache/assets/test/sprockets/v3.0/I_eYQo-PIB26ThZLPef1mrJs4U2tpRFqiL_q_JrB3FA.cache
loco-rails-0.0.1 test/dummy/tmp/cache/assets/development/sprockets/v3.0/I_eYQo-PIB26ThZLPef1mrJs4U2tpRFqiL_q_JrB3FA.cache