o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1398162850.1214988: @value"D{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/bundler/gems/engine-daa498a01652/app/assets/javascripts/locomotive/models/site.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;TI"2014-04-21T01:19:19+02:00;TI" length;Ti< I" digest;TI"%17aae1b6e97ce9acdecefafd65ee38ae;FI" source;TI"< (function() { var __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() { return Site.__super__.constructor.apply(this, arguments); } 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() { return _.tap(Site.__super__.toJSON.apply(this, arguments), (function(_this) { return 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')]); }; })(this)); }; Site.prototype._fix_attributes = function() { var domains, memberships; domains = _.map(this.get('domains_without_subdomain'), (function(_this) { return function(name) { return new Locomotive.Models.Domain({ name: name }); }; })(this)); 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() { return CurrentSite.__super__.constructor.apply(this, arguments); } CurrentSite.prototype.url = "" + Locomotive.mounted_on + "/current_site"; return CurrentSite; })(Locomotive.Models.Site); }).call(this); ;TI"dependency_digest;TI"%0cb524215e48b5d3c9b35226ea412a83;FI"required_paths;T[I"•/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/engine-daa498a01652/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/bundler/gems/engine-daa498a01652/app/assets/javascripts/locomotive/models/site.js.coffee;FI" mtime;TI"2014-04-21T01:19:19+02:00;TI" digest;TI"%05cf41aed4e2a5f0da4dd69c450fc609;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F