o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1383239451.90594: @value"{I" class:ETI"ProcessedAsset;FI"logical_path;TI"locomotive/models/site.js;FI" pathname;TI"Ž/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/locomotive_cms-2.3.0/app/assets/javascripts/locomotive/models/site.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;TI"2013-10-31T17:26:43+01:00;TI" length;Ti I" digest;TI"%9568c8441b12e8132ae29396b450092b;FI" source;TI" (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;TI"%dd11a3a9b4bc81589f847027cdec2eed;FI"required_paths;T[I"Ž/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/locomotive_cms-2.3.0/app/assets/javascripts/locomotive/models/site.js.coffee;FI"dependency_paths;T[{I" path;TI"Ž/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/locomotive_cms-2.3.0/app/assets/javascripts/locomotive/models/site.js.coffee;FI" mtime;TI"2013-10-31T17:26:43+01:00;TI" digest;TI"%05cf41aed4e2a5f0da4dd69c450fc609;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F