o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1364984306.3069482: @value" {I" class:EFI"ProcessedAsset;FI"logical_path;FI"locomotive/models/site.js;TI" pathname;FI"e/Users/papipo/Projects/locomotive/engine/app/assets/javascripts/locomotive/models/site.js.coffee;TI"content_type;FI"application/javascript;FI" mtime;FI"2013-01-18T09:21:50+01:00;FI" length;Fi½ I" digest;F"%a2cb0e0d3b21f7ce0ab4e73f6811b3e2I" 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() { 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 }); }; 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) { delete hash.memberships; if ((_this.get('memberships') != null) && _this.get('memberships').length > 0) { hash.memberships_attributes = _this.get('memberships').toJSONForSave(); } delete hash.domains; return hash.domains = _.map(_this.get('domains'), function(domain) { return domain.get('name'); }); }); }; 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"%89bc4ee68d4eff7aece171b1708100b2I"required_paths;F[I"e/Users/papipo/Projects/locomotive/engine/app/assets/javascripts/locomotive/models/site.js.coffee;TI"dependency_paths;F[{I" path;FI"e/Users/papipo/Projects/locomotive/engine/app/assets/javascripts/locomotive/models/site.js.coffee;TI" mtime;FI"2013-01-18T09:21:50+01:00;FI" digest;F"%e2ad939c34e7dfc852da003ee421fc2bI" _version;F"%6776f581a4329e299531e1d52aa59832