{:uriI"§file://app/assets/javascripts/validators/vulgarity.coffee?type=application/javascript&pipeline=self&id=f9f7d268bb3cfa07e48de3e0423dfe0e782e6ee342a45ec8ae9b8ec899926a50:ET:load_pathI"app/assets/javascripts;T: filenameI"7app/assets/javascripts/validators/vulgarity.coffee;T: nameI"validators/vulgarity;T:logical_pathI"!validators/vulgarity.self.js;T:content_typeI"application/javascript;T: sourceI"A(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.Vulgarity = (function(superClass) { extend(Vulgarity, superClass); Vulgarity.identity = 'Vulgarity'; function Vulgarity() { Vulgarity.__super__.constructor.apply(this, arguments); } Vulgarity.prototype.validate = function() { var vulgarWord; if (this.val == null) { return; } switch (typeof this.val) { case 'string': vulgarWord = this._getVulgarWord(); if (RegExp("" + vulgarWord, "i").exec(this.val)) { return this._addErrorMessage(); } else { } break; default: throw new TypeError("Vulgarity validator is applicable only for strings and " + this.attr + " isn't."); } }; Vulgarity.prototype._addErrorMessage = function() { var message; message = App.I18n[App.Env.loco.getLocale()].errors.messages.vulgarity; return this.obj.addErrorMessage(message, { "for": this.attr }); }; Vulgarity.prototype._getVulgarWord = function() { switch (App.Env.loco.getLocale()) { case 'pl': return 'kurwa'; case 'en': return 'fuck'; } }; return Vulgarity; })(App.Validators.Base); }).call(this); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"Efile-digest://app/assets/javascripts/validators/vulgarity.coffee;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%- þ ¨¸m-b4e+.m5K‹Þ¸\Hr¦ÏœH: lengthiA:dependencies_digest"%·£¡§b^{s«È¿1ÇÒƒ›>ƒb 'vYî=?ùÌ&:idI"Ef9f7d268bb3cfa07e48de3e0423dfe0e782e6ee342a45ec8ae9b8ec899926a50;F: mtimel+›™ŠX