o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1381401966.6390028: @value"º{I" class:EFI"ProcessedAsset;FI"logical_path;FI"locomotive/models/site.js;TI" pathname;FI"~/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.2.3/app/assets/javascripts/locomotive/models/site.js.coffee;TI"content_type;FI"application/javascript;FI" mtime;FI"2013-10-10T12:39:17+02:00;FI" length;Fi I" digest;F"%9568c8441b12e8132ae29396b450092bI" source;FI" (function() { var _ref, _ref1, __hasProp = {}.hasOwnProperty, __extends = 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; }; Locomotive.Models.Site = (function(_super) { __extends(Site, _super); function Site() { _ref = Site.__super__.constructor.apply(this, arguments); return _ref; } Site.prototype.paramRoot = 'site'; Site.prototype.urlRoot = "" + Locomotive.mounted_on + "/sites"; Site.prototype.initialize = function() { this._fix_attributes(); return this.on('sync', function() { return this._fix_attributes(); }); }; Site.prototype.includes_domain = function(name_with_port) { var name; name = name_with_port.replace(/:[0-9]*/, ''); return name === this.domain_with_domain() || _.any(this.get('domains'), function(domain) { return domain.get('name') === name; }); }; Site.prototype.domain_with_domain = function() { return "" + (this.get('subdomain')) + "." + (this.get('domain_name')); }; Site.prototype.toJSON = function() { var _this = this; return _.tap(Site.__super__.toJSON.apply(this, arguments), function(hash) { _.each(['locales_text', 'timezone_name_text'], function(key) { return delete hash[key]; }); delete hash.memberships; if ((_this.get('memberships') != null) && _this.get('memberships').length > 0) { hash.memberships_attributes = _this.get('memberships').toJSONForSave(); } delete hash.domains; hash.domains = _.map(_this.get('domains'), function(domain) { return domain.get('name'); }); return hash.locales = _.flatten([_this.get('locales')]); }); }; Site.prototype._fix_attributes = function() { var domains, memberships, _this = this; domains = _.map(this.get('domains_without_subdomain'), function(name) { return new Locomotive.Models.Domain({ name: name }); }); memberships = new Locomotive.Models.MembershipsCollection(this.get('memberships')); return this.set({ domains: domains, memberships: memberships }); }; return Site; })(Backbone.Model); Locomotive.Models.CurrentSite = (function(_super) { __extends(CurrentSite, _super); function CurrentSite() { _ref1 = CurrentSite.__super__.constructor.apply(this, arguments); return _ref1; } CurrentSite.prototype.url = "" + Locomotive.mounted_on + "/current_site"; return CurrentSite; })(Locomotive.Models.Site); }).call(this); ;TI"dependency_digest;F"%dd11a3a9b4bc81589f847027cdec2eedI"required_paths;F[I"~/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.2.3/app/assets/javascripts/locomotive/models/site.js.coffee;TI"dependency_paths;F[{I" path;FI"~/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.2.3/app/assets/javascripts/locomotive/models/site.js.coffee;TI" mtime;FI"2013-10-10T12:39:17+02:00;FI" digest;F"%05cf41aed4e2a5f0da4dd69c450fc609I" _version;F"%ffd318ca8b794f42f5029101c2cf5d91